CVE-2026-28753 Overview
NGINX Plus and NGINX Open Source contain a vulnerability in the ngx_mail_smtp_module module due to improper handling of CRLF sequences in DNS responses. This flaw allows an attacker who controls a DNS server to inject arbitrary headers into SMTP upstream requests, potentially leading to request manipulation and email spoofing scenarios. Software versions that have reached End of Technical Support (EoTS) are not evaluated.
Critical Impact
Attackers controlling DNS responses can inject malicious SMTP headers, potentially enabling email spoofing, bypassing security controls, or manipulating mail routing in affected NGINX deployments.
Affected Products
- F5 NGINX Plus R32 (P1 through P4)
- F5 NGINX Plus R33, R34, R35, R36 (all patch levels)
- F5 NGINX Open Source (multiple versions)
Discovery Timeline
- 2026-03-24 - CVE CVE-2026-28753 published to NVD
- 2026-03-26 - Last updated in NVD database
Technical Details for CVE-2026-28753
Vulnerability Analysis
This vulnerability is classified under CWE-93 (Improper Neutralization of CRLF Sequences), commonly known as CRLF Injection or HTTP Response Splitting. The ngx_mail_smtp_module module in NGINX fails to properly sanitize Carriage Return Line Feed (CRLF) sequences when processing DNS responses during SMTP proxy operations.
When NGINX acts as a mail proxy, it relies on DNS lookups to resolve upstream mail server addresses. If an attacker controls the DNS infrastructure or can perform DNS spoofing, they can craft malicious DNS responses containing embedded CRLF sequences. These sequences pass through the vulnerable module without proper sanitization and are subsequently injected into SMTP protocol communications with upstream servers.
The vulnerability requires network access and depends on the attacker's ability to influence DNS responses, which introduces complexity into the attack chain. However, in environments where DNS security is not rigorously enforced, this vulnerability poses a tangible risk to email integrity and security controls.
Root Cause
The root cause lies in insufficient input validation within the ngx_mail_smtp_module when processing DNS response data. The module fails to strip or escape CRLF characters (\r\n) from DNS response fields before incorporating them into SMTP protocol messages. This oversight allows attackers to break out of intended data fields and inject additional SMTP headers or commands.
Attack Vector
The attack requires network-level access and the ability to control or manipulate DNS responses received by the vulnerable NGINX server. The attack flow involves:
- Attacker establishes control over a DNS server or performs DNS cache poisoning
- Victim NGINX server performs DNS lookup during SMTP proxy operations
- Malicious DNS response contains crafted CRLF sequences in response fields
- NGINX incorporates unsanitized data into SMTP upstream requests
- Injected headers manipulate mail delivery, routing, or authentication
The vulnerability manifests during DNS response processing within the mail module's SMTP handling routines. When the module parses DNS records for upstream server resolution, it fails to properly sanitize special characters. An attacker-controlled DNS server can return responses with embedded CRLF sequences in TXT records, PTR records, or other DNS fields that NGINX subsequently processes.
For example, a malicious DNS response might include a crafted value that, when processed, injects additional SMTP headers such as From:, To:, or X- headers into the upstream SMTP session. See the F5 Security Advisory for additional technical details.
Detection Methods for CVE-2026-28753
Indicators of Compromise
- Anomalous DNS queries from NGINX servers to unexpected or unauthorized DNS servers
- SMTP log entries showing unexpected headers or malformed protocol data
- Network traffic containing DNS responses with embedded CRLF sequences (%0d%0a or \r\n)
- Unusual mail routing behavior or unauthorized email modifications
Detection Strategies
- Monitor NGINX mail proxy logs for SMTP protocol anomalies or unexpected header injections
- Implement DNS query monitoring to detect suspicious resolution patterns or responses from untrusted sources
- Deploy network intrusion detection rules to identify DNS responses containing CRLF character sequences
- Analyze SMTP traffic between NGINX and upstream mail servers for signs of header injection
Monitoring Recommendations
- Enable verbose logging for the ngx_mail_smtp_module to capture detailed SMTP session information
- Implement DNSSEC validation to ensure DNS response integrity and authenticity
- Configure alerting for any SMTP communications containing unexpected header patterns
- Establish baseline DNS behavior for NGINX servers and alert on deviations
How to Mitigate CVE-2026-28753
Immediate Actions Required
- Review and verify DNS server configurations to ensure NGINX only queries trusted, authoritative DNS servers
- Implement DNSSEC validation to protect against DNS response manipulation
- Audit NGINX configurations to identify deployments using the ngx_mail_smtp_module
- Apply vendor patches as soon as they become available from F5
Patch Information
F5 has released a security advisory addressing this vulnerability. Administrators should consult the F5 Security Advisory K000160367 for specific patch versions and update instructions. Affected versions include NGINX Plus R32-R36 and various NGINX Open Source releases.
Workarounds
- Restrict DNS resolution to trusted, internal DNS servers with DNSSEC validation enabled
- Implement network-level controls to prevent NGINX servers from communicating with untrusted DNS infrastructure
- Consider disabling the ngx_mail_smtp_module if SMTP proxy functionality is not required
- Deploy application-layer firewalls capable of inspecting and sanitizing DNS traffic for CRLF sequences
# Example: Restrict DNS resolution to trusted servers in NGINX configuration
# Add to nginx.conf within the mail context
resolver 10.0.0.53 valid=300s;
resolver_timeout 5s;
# Ensure NGINX only communicates with internal, trusted DNS servers
# Additional network-level ACLs should be applied at the firewall level
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


