CVE-2020-7247 OpenSMTPD Remote Code Execution Vulnerability
smtp_mailaddr in smtp_session.c in OpenSMTPD, as used in OpenBSD and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session.
From the CISA KEV catalogue version 2026.11.06, with Cybergen analysis. Updated 6 Nov 2026.
Should You Worry?
- CISA confirmed exploitation in the wild and added it to the Known Exploited Vulnerabilities catalogue on 25 Mar 2022.
- Rated Critical severity (CVSS 9.8, scored by CISA).
- It has been in the catalogue for 1,687 days. Systems still unpatched now have almost certainly been scanned for it.
What It Is
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.
What To Do Now
- 1
Find it
Search your asset inventory and external attack surface for OpenBSD OpenSMTPD. Include cloud images, appliances and anything a supplier runs for you.
Attack Surface Management - 2
- 3
Hunt for compromise
If an affected system was reachable before you patched, assume it may have been hit. Check logs, new accounts, web shells and outbound connections from the date of exposure.
Incident Response - 4
Prove it is fixed
Rescan or test the system after patching. Upgrades that fail silently and forgotten secondary instances are common.
Penetration Testing
Vendor Advisories
The Compliance Clock
General guidance, not legal advice. Your obligations depend on your sector, scope and jurisdiction.
More Exploited OpenBSD Flaws
Not Sure If You Are Exposed?
Our attack surface and vulnerability teams can check your internet-facing estate for CVE-2020-7247 and every other exploited flaw on the list.
Sources
- CISA Known Exploited Vulnerabilities catalogue
- NVD: CVE-2020-7247
- CVE record: CVE-2020-7247
- FIRST EPSS
- openbsd.org/security.html
- openwall.com/lists/oss-security/2020/01/28/3
- github.com/openbsd/src/commit/9dcfda045474d8903224d175907bfc29761dcb45
- packetstormsecurity.com/files/156137/OpenBSD-OpenSMTPD-Privilege-Escalation-Code-Execution.html
- seclists.org/bugtraq/2020/Jan/51
- debian.org/security/2020/dsa-4611
- packetstormsecurity.com/files/156145/OpenSMTPD-6.6.2-Remote-Code-Execution.html
- kb.cert.org/vuls/id/390745
