---
id: "CVE-2020-7247"
kind: "vulnerability"
aliases: ["CVE-2020-7247"]
title: "OpenBSD OpenSMTPD: OpenSMTPD Remote Code Execution Vulnerability"
severity: "critical"
cvss: 10.0
epss: 0.98972
exploited: true
status: "open"
category: "infrastructure"
products: [{"name": "OpenBSD OpenSMTPD", "fixed": [], "affected": "", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["exploited", "infrastructure", "mail-server", "openbsd", "opensmtpd", "self-hosted"]
not_affected_if: ["no-opensmtpd-running", "other-mta-in-use"]
published_at: "2020-01-29T16:15:12+00:00"
first_seen_at: "2026-10-23T19:11:52+00:00"
updated_at: "2026-10-23T21:57:35+00:00"
sources: [{"source": "kev", "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2020-7247", "first_seen_at": "2026-10-23T19:11:52+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2020-7247", "first_seen_at": "2026-10-23T19:13:44+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-7247", "first_seen_at": "2026-10-23T21:57:35+00:00"}]
---

# OpenBSD OpenSMTPD: OpenSMTPD Remote Code Execution Vulnerability

OpenSMTPD, the mail server shipped with OpenBSD and used in other products, has a flaw in its SMTP address parsing (smtp_mailaddr). A remote attacker who sends a crafted SMTP session can execute arbitrary commands as root.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:OpenBSD OpenSMTPD affected ? fixed ?

## Fix

Apply the OpenSMTPD update from the vendor (OpenBSD or your distribution) per CISA's required action; exact fixed version: unknown

## Timeline

- 2026-10-23T19:11:52+00:00 kev https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2020-7247
- 2026-10-23T19:13:44+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2020-7247
- 2026-10-23T21:57:35+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2020-7247

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
