CVE-2020-7247 in Canonical Ubuntu Linux and 3 more products
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 b...
Affects 4 products from 4 vendors. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Canonical | Ubuntu Linux | 18.04 19.10 |
| Debian | Debian Linux | 9.0 10.0 |
| Fedoraproject | Fedora | 32 |
| Openbsd | Opensmtpd | 6.6 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Yes added 2022-03-25 |
|---|---|
| Public exploit | Reported · reference |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2020-7247 |
|---|---|
| BreachSpider ID | BS-2020-GLOBAL-245359-C |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2020-01-29 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-78: OS Command Injection
Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.
CWE-755: CWE-755
Related attack patterns (CAPEC)
CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-78
CAPEC-108 Command Line Execution through SQL Injection via CWE-78
CAPEC-6 Argument Injection via CWE-78
CAPEC-15 Command Delimiters via CWE-78
CAPEC-88 OS Command Injection via CWE-78
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2020-7247 is a critical vulnerability in OpenSMTPD 6.6, allowing remote attackers to execute arbitrary commands as root through a crafted SMTP session. This affects the default configuration and has a high likelihood of exploitation due to the availability of public proof-of-concept code and active exploits.
The vulnerability arises from an incorrect return value upon failure of input validation in the smtp_mailaddr function within smtp_session.c. An attacker can exploit this by sending a crafted MAIL FROM command containing shell metacharacters, leading to remote code execution with root privileges.
Compensating controls AI-drafted, review before use
Implement strict input validation and sanitization on all incoming SMTP commands, particularly the MAIL FROM field, to prevent the injection of shell metacharacters.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Questions
What is CVE-2020-7247?
CVE-2020-7247 is a critical vulnerability in OpenSMTPD 6.6, allowing remote attackers to execute arbitrary commands as root through a crafted SMTP session. This affects the default configuration and has a high likelihood of exploitation due to the availability of public proof-of-concept code and active exploits.
What is the CVSS score for CVE-2020-7247?
CVE-2020-7247 has CVSS 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 99.0%.
Is CVE-2020-7247 actively exploited?
Yes. CVE-2020-7247 is in the CISA known-exploited catalog (added 2022-03-25). Active exploitation confirmed. Immediate patching required.
How do I remediate CVE-2020-7247?
Priority: IMMEDIATE. Advisory: https://www.openbsd.org/security.html PSIRT: [email protected]
What systems are affected by CVE-2020-7247?
CVE-2020-7247 affects Canonical Ubuntu Linux; Debian Debian Linux; Fedoraproject Fedora; Openbsd Opensmtpd.
What NERC-CIP standard applies to CVE-2020-7247?
NERC CIP CIP-007 CIP-007-R2: This CVE violates CIP-007-R2 because it allows unauthorized access to control system devices, which could compromise the integrity and availability of critical infrastructure.
What IEC 62443 requirement maps to CVE-2020-7247?
IEC 62443 SR 7.6: This CVE maps to SR 7.6 because it involves a vulnerability that can be exploited remotely to gain control of a device, which is a significant risk to the security of industrial control systems.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Canonical","product":"Ubuntu Linux","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.