| Field | Value |
|---|---|
| CVE ID | CVE-2026-113425 |
| Product | nginx Mail Proxy (IMAP module) |
| Affected Version | nginx 1.31.8 |
| Vulnerability Type | IMAP Mail Proxy UAF / Worker Crash / DoS |
| CVSS 3.1 Score | 8.1 (High) |
| CWE | CWE-416 — Use After Free |
| Patch | 1.31.9 |
The nginx mail proxy module frees the upstream connection struct when the backend sends a TCP RST, but the downstream IMAP session handler retains a dangling pointer to it. Concurrent IMAP sessions that provoke upstream RST during AUTH responses can dereference freed memory, causing a SIGSEGV in the nginx mail proxy worker.
CWE-416 (Use After Free) — The upstream RST handler in the mail proxy module deallocates the upstream connection object without notifying the downstream IMAP session handler, which continues to reference the freed struct through a cached pointer in the session context.
flowchart LR
A([Attacker]) -->|Concurrent IMAP AUTH + upstream RST| B[/nginx mail proxy module/]
B -->|CWE-416: freed upstream struct| C[Downstream IMAP handler UAF]
C -->|Worker SIGSEGV| D([Mail proxy DoS])
E([Patch: 1.31.9]) -.->|Mitigation| B
style A fill:#1a0810,color:#e94560
style D fill:#3d0015,color:#fff
style E fill:#0d2b1a,color:#4ade80
docker compose up -d --build
python poc.py --variant rst --concurrency 8 --waves 10 -H imap://localhost:143| Flag | Description |
|---|---|
-H / --host |
Target nginx IMAP proxy URL |
--variant |
rst / close_notify / stall (default: rst) |
--concurrency |
Simultaneous IMAP sessions (default: 8) |
--waves |
Attack waves (default: 10) |
-v / --verbose |
Verbose output |
- Monitor nginx mail proxy logs for worker crashes during AUTH phases
- Alert on upstream IMAP backend sending excessive RST packets
- Track nginx worker respawn frequency for the mail proxy process
- Inspect IMAP proxy connection logs for correlated upstream RST + crash events
- Update nginx to 1.31.9 or later
- Add upstream IMAP backend health checks to detect and reroute from unstable backends
- Set
proxy_timeoutvalues to limit hanging sessions - Run nginx mail proxy workers in an isolated process group
This tool is developed exclusively for authorized penetration testing and security research. Use against systems without explicit permission is illegal. The user assumes all legal responsibility.
Author: cveForge | License: MIT | Organization: cveForge
process exited with code 0 • researched by cveForge