{
  "Name": "OpenSMTPD Remote Code Execution Vulnerability (CVE-2020-7247)",
  "Description": "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.",
  "Product": "OpenSMTPD",
  "Homepage": "https://www.opensmtpd.org/",
  "DisclosureDate": "2020-01-29",
  "Author": "gobysec@gmail.com",
  "GifAddress": "https://raw.githubusercontent.com/gobysec/GobyVuls/master/OpenSMTPD/CVE-2020-7247/CVE-2020-7247.gif",
  "FofaQuery": "banner=\"opensmtpd\" && protocol==\"smtp\"",
  "GobyQuery": "banner=\"opensmtpd\" && protocol==\"smtp\"",
  "Level": "3",
  "Impact": "It allows an attacker to execute arbitrary shell commands with elevated privileges. ",
  "Recommendation": "To remediate this vulnerability, affected OpenBSD users are recommended to install patches for OpenBSD 6.6. See reference 019 in https://www.openbsd.org/errata66.html.",
  "References": [
    "http://packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html",
    "http://packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html",
    "http://packetstormsecurity.com/files/156249/OpenSMTPD-MAIL-FROM-Remote-Code-Execution.html",
    "http://packetstormsecurity.com/files/156295/OpenSMTPD-6.6.1-Local-Privilege-Escalation.html",
    "http://seclists.org/fulldisclosure/2020/Jan/49",
    "http://www.openwall.com/lists/oss-security/2020/01/28/3",
    "https://github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45",
    "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OPH4QU4DNVHA7ACFXMYFCEP5PSXXPN4E/",
    "https://seclists.org/bugtraq/2020/Jan/51",
    "https://usn.ubuntu.com/4268-1/",
    "https://www.debian.org/security/2020/dsa-4611",
    "https://www.kb.cert.org/vuls/id/390745",
    "https://www.openbsd.org/security.html",
    "https://nvd.nist.gov/vuln/detail/CVE-2020-7247",
    "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7247"
  ],
  "HasExp": true,
  "ExpParams": [
			{
                  "name": "AttackType",
                  "type": "select",
                  "value": "cmd,goby_shell_linux"
            },
			{
                  "name": "cmd",
                  "type": "input",
                  "value": "whoami",
				  "show": "AttackType=cmd"
            }
	],
  "ExpTips": {
    "Type": "",
    "Content": ""
  },
  "ScanSteps": null,
  "ExploitSteps": null,
  "Tags": null,
  "CVEIDs": [
    "CVE-2020-7247"
  ],
  "CVSSScore": "9.8",
  "AttackSurfaces": {
    "Application": null,
    "Support": null,
    "Service": null,
    "System": null,
    "Hardware": null
  }
}