Actively exploited in the wild. This CVE is on the CISA Known Exploited Vulnerabilities list — treat remediation as urgent. Federal remediation due by 15 Apr 2022.
Debian LinuxOperating system · Debian

CVE-2020-7247

CRITICAL · 9.8 CVSS v3.1 Published 2020-01-29
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
In the wild High EPSS Public exploit Remotely reachable No privileges Zero-click Patch available

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 · unedited
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.

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 confidence

OpenSMTPD 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.

MitigationUpgrade 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.

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
Debian LinuxOperating system
Affected:= 9.0= 10.0
FedoraOperating system
Affected:= 32
Ubuntu LinuxOperating system
Affected:= 18.04= 19.10
OpensmtpdApplication
Affected:= 6.6

CVSS 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 checks

Work through these to decide whether this CVE applies to you.

  1. Verify OpenSMTPD is installed
    Check 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
  2. Determine installed version
    Run 'opensmtpd -v' or inspect the package version from step 1 to compare against the affected version 6.6
    Affected if The installed version is exactly 6.6 or falls within the affected version range for your distribution
  3. Confirm SMTP service is running
    Check 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
  4. Assess network exposure
    Review 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 localhost
    Affected if Port 25 (SMTP) is listening on a non-localhost interface and accessible from untrusted networks
  5. Inspect MAIL FROM validation behavior
    Connect 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 environment
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Upgrade 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.

Recommended fix High confidence

OpenSMTPD 6.6.1 or later (OpenSMTPD 7.0.0 recommended)

  1. 1. Check the current OpenSMTPD version by running: smtpd -v or dpkg -l | grep smtpd / rpm -q smtpda
  2. 2. For Debian/Ubuntu: Run 'apt update' then 'apt install opensmtpd' to get the latest security updates
  3. 3. For Fedora: Run 'dnf update opensmtpd' to apply security patches
  4. 4. For OpenBSD: Apply the official patch from OpenBSD security advisories or upgrade to OpenBSD 6.6 patch
  5. 5. After upgrading, verify the new version: smtpd -v
  6. 6. Review /etc/smtpd.conf configuration to ensure it follows current best practices
  7. 7. Restart the smtpd service: systemctl restart smtpd or rcctl restart smtpd
Caveat Upgrading to OpenSMTPD 7.x may require configuration changes as some syntax in smtpd.conf has changed

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Debian Linux Exploited in the wild — priority engagement
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing6.0 h
  • Review / QA2.0 h
14.0 hours of engineering $2,380
Get it fixed fast

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 locally
dbcve dependency scanner

Check 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

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2020-7247 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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