NGINX mail proxy use-after-free, RCE risk
High risk · public exploit
Risk assessment
NGINX mail proxy use-after-free lets remote unauthenticated attackers crash workers or corrupt memory (CVSS 9.2). Update to fixed release now.
What to do
Apply the latest security patches from the vendor. If patching is not immediately possible, review the mitigation steps in this advisory and monitor for exploitation attempts.
- No fixed version listed yet. Restrict exposure and watch the vendor advisory. NVD references
- Remediation and mitigation in this advisory
Exploitation confirmed - public proof-of-concept - CVE-2026-113425 is a critical use-after-free in NGINX Plus and NGINX Open Source when configured as a mail proxy that lets a remote unauthenticated attacker crash or corrupt an nginx worker process, with remote code execution possible where ASLR is disabled or can be bypassed. No official patch version is confirmed in this advisory; apply vendor mitigations below and track nginx’s stable channel.
Overview
NGINX ships a mail proxy module that forwards IMAP, POP3, and SMTP traffic to backend mail servers. In affected versions, undisclosed or malformed traffic to that proxy path can trigger a use-after-free in an nginx worker process. The bug lives in how the worker frees memory during mail proxy connection handling: a crafted sequence causes the process to reuse a memory region after it has been released.
Because the mail proxy accepts connections before authentication completes, an attacker does not need valid credentials to reach the vulnerable code. That is why the vector is scored as network-reachable with no privileges required, even though attack complexity is rated high.
Impact
- Denial of service: A single crafted connection can crash an nginx worker process, dropping active mail proxy sessions and disrupting service. Repeated attempts can keep workers restarting.
- Memory corruption: Beyond a clean crash, the use-after-free can corrupt worker memory, which is the precondition for code execution.
- Remote code execution: On hosts with Address Space Layout Randomization disabled, or where an attacker can bypass ASLR through other means, the corruption can be steered into arbitrary code execution under the worker’s privileges.
- Scope: This is a data plane issue only. There is no control plane exposure. Configurations that do not use the mail proxy module are outside the vulnerable path.
The CVSS score is 9.2, reflecting network reachability and no required privileges, tempered by high attack complexity.
Remediation and mitigation
- Patch: Update NGINX Plus and NGINX Open Source to a release that addresses CVE-2026-113425. Confirm the fix status with your vendor channel or subscription portal, since releases that have reached End of Technical Support are not evaluated.
- Disable the mail proxy if unused: If you do not proxy mail traffic, remove the
mail { }block from your configuration and reload. This takes the vulnerable code path out of scope entirely. - Reduce blast radius: Run nginx workers as an unprivileged user, keep the host patched, and enable ASLR (do not disable it for troubleshooting on internet-facing systems).
- Filter at the edge: Restrict access to mail proxy ports to known client networks where operationally feasible, and alert on repeated worker crashes.
- Watch for follow-on activity: Treat worker crashes as a signal, not noise. Correlated anomalies after a crash could indicate exploitation attempts.
For ongoing incident context, see our breach reports and security news.
Security Insight
The mail proxy module is one of nginx’s oldest and least-scrutinized surfaces, which is exactly where memory-safety bugs tend to linger while attention stays on the HTTP stack. The dependency on ASLR being disabled for RCE is cold comfort: most modern exploit chains treat ASLR bypass as a solved problem, so the gap between “crash” and “code execution” is narrower than the CVSS vector suggests. Teams that inherited a mail proxy config years ago and never revisited it should treat this as a prompt to audit whether that module needs to be loaded at all.
Further Reading
Exploit references 1 PoC Show
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| LLCForge/CVE-2026-113425 CVE-2026-113425 — nginx mail proxy use-after-free triggered by TCP RST during IMAP auth. Affects nginx 0.5.33–1.31.8. Docker PoC lab. | ★ 0 |
Showing 1 of 1 known references. Source: nomi-sec/PoC-in-GitHub.