CVE-2020-28026 Overview
CVE-2020-28026 is a critical command injection vulnerability affecting Exim mail transfer agent versions prior to 4.94.2. The flaw stems from improper neutralization of line delimiters in non-default configurations that enable Delivery Status Notification (DSN). Certain uses of ORCPT= can place a newline into a spool header file, allowing unauthenticated remote attackers to execute arbitrary commands with root privileges.
Critical Impact
Unauthenticated remote attackers can achieve root-level command execution on vulnerable Exim servers with DSN enabled, potentially leading to complete system compromise.
Affected Products
- Exim versions before 4.94.2
- Systems with non-default DSN (Delivery Status Notification) configurations enabled
- Mail servers accepting SMTP connections with ORCPT parameter handling
Discovery Timeline
- 2021-05-06 - CVE-2020-28026 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-28026
Vulnerability Analysis
This vulnerability exploits improper handling of line delimiters in Exim's Delivery Status Notification processing. When DSN is enabled (a non-default configuration), the mail server processes the ORCPT= parameter during SMTP transactions. The vulnerability allows an attacker to inject newline characters through specially crafted ORCPT= values, which are then written directly into spool header files without proper sanitization.
The injection of newline characters into spool header files allows attackers to manipulate the structure of these files, potentially inserting arbitrary header content that gets processed by Exim's delivery mechanisms. Since Exim runs with elevated privileges (typically as root) during mail delivery operations, successful exploitation results in arbitrary command execution with root-level access.
Root Cause
The root cause is insufficient input validation and improper neutralization of special characters (specifically line delimiters) in the ORCPT= parameter processing logic. When constructing spool header files, Exim fails to properly sanitize or escape newline characters embedded in ORCPT values, allowing attackers to break out of the intended data context and inject malicious content.
Attack Vector
The attack is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability by:
- Connecting to a vulnerable Exim SMTP server with DSN enabled
- Initiating an SMTP transaction with a specially crafted ORCPT= parameter containing newline characters
- The malicious newline characters are written to spool header files
- When Exim processes the spool file, the injected content is interpreted as legitimate headers or commands
- This leads to arbitrary command execution with root privileges
The attack complexity is low as exploitation requires only network access to the SMTP service and knowledge of the vulnerability mechanics. For detailed technical analysis, refer to the Exim Security Advisory CVE-2020-28026.
Detection Methods for CVE-2020-28026
Indicators of Compromise
- Unusual or malformed entries in Exim spool header files containing unexpected newline sequences
- SMTP log entries showing abnormal ORCPT= parameter values with encoded or raw newline characters
- Unexpected processes spawned by the Exim mail daemon
- System logs indicating unauthorized command execution with Exim-related parent processes
Detection Strategies
- Monitor SMTP traffic for malformed or suspicious ORCPT= parameters containing %0a, %0d, or raw newline characters
- Implement intrusion detection rules to flag SMTP transactions with abnormal DSN-related parameters
- Deploy file integrity monitoring on Exim spool directories to detect unauthorized modifications
- Configure alerting for any non-standard command execution originating from Exim processes
Monitoring Recommendations
- Enable detailed SMTP transaction logging to capture all DSN-related parameter values
- Implement real-time monitoring of Exim process activity and child process spawning
- Review Exim version inventory across all mail servers to identify vulnerable instances
- Configure network monitoring to detect exploitation attempts targeting port 25/SMTP
How to Mitigate CVE-2020-28026
Immediate Actions Required
- Upgrade Exim to version 4.94.2 or later immediately on all affected systems
- If immediate patching is not possible, disable Delivery Status Notification (DSN) functionality
- Review Exim configuration to ensure DSN is explicitly disabled if not required
- Audit existing spool files for signs of compromise before applying patches
Patch Information
Exim version 4.94.2 contains the official fix for this vulnerability. Administrators should upgrade to this version or later to address CVE-2020-28026. The patch properly sanitizes line delimiter characters in ORCPT= parameter handling, preventing the injection of newline characters into spool header files. For complete technical details on the vulnerability and fix, see the Exim Security Advisory.
Workarounds
- Disable DSN functionality in Exim configuration if the feature is not required for business operations
- Implement network-level filtering to block or sanitize SMTP traffic containing suspicious ORCPT patterns
- Deploy application-layer firewall rules to inspect and filter malicious SMTP commands
- Consider running Exim in a containerized or sandboxed environment to limit impact of potential exploitation
# Disable DSN in Exim configuration (exim.conf)
# Add or modify the following to disable DSN processing:
dsn_advertise_hosts =
# Verify Exim version after patching
exim -bV | grep version
# Check if DSN is currently enabled
exim -bP dsn_advertise_hosts
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


