CVE-2020-7247
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedsmtp_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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceOpenSMTPD 6.6 contains a command injection vulnerability in smtp_mailaddr() in smtp_session.c where insufficient input validation on the MAIL FROM field returns an incorrect error status, allowing shell metacharacters to be passed through. Remote attackers can execute arbitrary commands as root via specially crafted SMTP sessions.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 9.0= 10.0= 32= 18.04= 19.10= 6.6CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Verify OpenSMTPD is installedCheck for OpenSMTPD package using your system package manager (dpkg -l | grep opensmtpd for Debian/Ubuntu, rpm -qa | grep opensmtpd for Fedora/RHEL, or pkg_info | grep opensmtpd for OpenBSD)Affected if OpenSMTPD package is found on the system
-
Determine installed versionRun 'opensmtpd -v' or inspect the package version from step 1 to compare against the affected version 6.6Affected if The installed version is exactly 6.6 or falls within the affected version range for your distribution
-
Confirm SMTP service is runningCheck if the smtpd process is active (systemctl status smtpd, service smtpd status, or ps aux | grep smtpd)Affected if The OpenSMTPD SMTP daemon is currently running
-
Assess network exposureReview firewall rules (iptables -L or ufw status) and netstat/ss output (ss -tlnp | grep :25) to determine if port 25 is accessible from network interfaces other than localhostAffected if Port 25 (SMTP) is listening on a non-localhost interface and accessible from untrusted networks
-
Inspect MAIL FROM validation behaviorConnect to the SMTP service (telnet localhost 25 or netcat) and issue SMTP commands: EHLO test, then MAIL FROM:<test@$(whoami)> to observe if the vulnerability is exploitable in your environmentAffected if The MAIL FROM field accepts shell metacharacters without proper sanitization and the service runs with elevated privileges
You are affected if OpenSMTPD version 6.6 is installed, the SMTP service is running, and it is accessible from network interfaces where untrusted attackers could inject shell metacharacters into the MAIL FROM field.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to a patched version of OpenSMTPD. If immediate patching is not possible, restrict SMTP access to trusted networks or disable the default configuration that permits external relay.
OpenSMTPD 6.6.1 or later (OpenSMTPD 7.0.0 recommended)
- 1. Check the current OpenSMTPD version by running: smtpd -v or dpkg -l | grep smtpd / rpm -q smtpda
- 2. For Debian/Ubuntu: Run 'apt update' then 'apt install opensmtpd' to get the latest security updates
- 3. For Fedora: Run 'dnf update opensmtpd' to apply security patches
- 4. For OpenBSD: Apply the official patch from OpenBSD security advisories or upgrade to OpenBSD 6.6 patch
- 5. After upgrading, verify the new version: smtpd -v
- 6. Review /etc/smtpd.conf configuration to ensure it follows current best practices
- 7. Restart the smtpd service: systemctl restart smtpd or rcctl restart smtpd
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing6.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,808.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2020-7247 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sources- github.com
- packetstormsecurity.com
- github.com
- www.openbsd.org
- packetstormsecurity.com
- packetstormsecurity.com
- packetstormsecurity.com
- packetstormsecurity.com
- packetstormsecurity.com
- seclists.org
- www.openwall.com
- lists.fedoraproject.org
- seclists.org
- usn.ubuntu.com
- www.debian.org
- www.kb.cert.org
- www.cisa.gov
- nvd.nist.gov
Practitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2020-7247 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data