nginx PoolSlip × Rift Chained ASLR-Independent Remote Code Execution (CVE-2026-9256 / CVE-2026-42945)
by y198nt (chaining, ASLR-independent technique, Debian glibc-2.41 port); rift component PoC by DepthFirstDisclosures · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-9256 ("PoolSlip"), chained with CVE-2026-42945 ("rift")
- Category
- web
- Affected product
- nginx (rewrite engine)
- Affected versions
- CVE-2026-42945 (rift): 0.6.27 – 1.30.0; CVE-2026-9256 (PoolSlip): 0.1.17 – 1.30.1 and 1.31.0 (both fixed only as of 1.30.2 / 1.31.1)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-06 |
| Author / Researcher | y198nt (chaining, ASLR-independent technique, Debian glibc-2.41 port); rift component PoC by DepthFirstDisclosures |
| CVE / Advisory | CVE-2026-9256 (“PoolSlip”), chained with CVE-2026-42945 (“rift”) |
| Category | web |
| Severity | Critical |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | nginx, heap-overflow, heap-over-read, aslr-bypass, rce, rewrite-engine, request-smuggling-adjacent, chained-exploit |
| Related | CVE-2026-42945 |
Affected Target
| Field | Value |
|---|---|
| Software / System | nginx (rewrite engine) |
| Versions Affected | CVE-2026-42945 (rift): 0.6.27 – 1.30.0; CVE-2026-9256 (PoolSlip): 0.1.17 – 1.30.1 and 1.31.0 (both fixed only as of 1.30.2 / 1.31.1) |
| Language / Platform | C (nginx core), tested on stock nginx:1.30.0 Docker image, Debian 13 / glibc 2.41 |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
This PoC chains two nginx rewrite-engine bugs that share the same root cause — a two-pass mismatch in how is_args/$args length is computed — into a single ASLR-independent remote system() call on a stock, unmodified nginx:1.30.0 Docker image, with no hardcoded addresses and no nginx restart required (~90% reliability per fresh worker). CVE-2026-9256 (“PoolSlip”) is a heap over-read triggered via a crafted rewrite directive that lets $args be reflected past its buffer, leaking live libc and heap addresses. CVE-2026-42945 (“rift”) is a heap overflow limited to URL-safe bytes, used here to perform a 2-byte partial overwrite of an already-valid limit_conn cleanup pointer — since only the ASLR-random low bytes are overwritten, the technique works regardless of ASLR. The corrupted pointer is redirected to a sprayed cleanup handler that calls system(cmd), achieving remote code execution when nginx tears down the connection.
Vulnerability Details
Root Cause
Both CVEs stem from the same is_args two-pass length-computation mismatch in nginx’s rewrite engine, exploited against two different sinks: an over-read (PoolSlip, CVE-2026-9256) for an information leak, and a heap overflow (rift, CVE-2026-42945) for a controlled, URL-safe-byte-only write.
Attack Vector
- Leak (PoolSlip): A
rewrite ^/search/((.*))$ /lookup?$1$2directive causes the copy pass to setr->args.lenpast the intended buffer; a degraded/searchpage reflects$args, leaking adjacent heap contents. After a short warm-up, a stable libpcre-cluster pointer (fixed offset below libc) and a heap pointer yieldlibc_baseandheap_basewith no hardcoded addresses. - Write (rift): The rift heap overflow can only emit URL-safe bytes, making a full 48-bit address write unreliable under ASLR (~0.9% success). Instead, only the low 2 bytes of an already-valid
limit_conncleanup pointer are overwritten — the ASLR-randomized high bytes are left untouched, making the technique ASLR-independent. - Fire: The corrupted pointer is redirected into a heap-sprayed
ngx_pool_cleanup_t{handler=&system, data=cmd, next=0}structure. When the connection pool is torn down,ngx_destroy_pool()walks the cleanup list and invokessystem(cmd).
Impact
Unauthenticated remote code execution against a stock, unpatched nginx instance via crafted HTTP requests alone, with no memory-layout knowledge required due to the ASLR-independent overwrite technique.
Environment / Lab Setup
Target: Local Docker lab — stock nginx:1.30.0 image serving the bundled nginx.conf (API-gateway-style
config with limit_conn, a v1->v2 migration rewrite, an upload proxy, and a degraded search page),
plus a perl-based slow upstream, exposed on host port 19322
Attacker: Docker, Python 3, curl, Linux x86-64
Proof of Concept
PoC Script
See
exp_official.py,nginx.conf, andrun.shin this folder.
| |
exp_official.py is one-shot per run (leaks once, fires once, ~90% success per fresh worker); if the proof file is empty, the heap grooming landed a slot off and the script should simply be re-run against a fresh worker.
Detection & Indicators of Compromise
grep -E '\$1\$2|\$args' /etc/nginx/*.conf # audit for the vulnerable rewrite pattern
Signs of compromise:
rewritedirectives whose replacement target contains a literal?and references a PCRE capture group (e.g.$1/$2), or nested-capture patterns like^/x/((.*))$ -> /y?$1$2.- A reflected
$args(or any request-derived variable echoed back verbatim) in application responses. - WAF/log signals: floods of
%2B/+characters in the URI path (e.g.GET /search/+++...), HTTP 503 responses from a degraded page echoing a long$args, and nginx workerSIGSEGV/respawn storms.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to nginx 1.30.2 (stable) or 1.31.1 (mainline) — note that 1.30.1 fixes rift but remains vulnerable to PoolSlip, so only 1.30.2+ closes both. NGINX Plus: R36 P5 / R32 P7 / R37.0.1.1 |
| Interim mitigation | Audit configs for rewrite/set directives combining a ? replacement with PCRE captures and rework them; avoid reflecting request-derived variables (like $args) verbatim in responses |
References
- Source repository
- Full technical writeup
- Original rift component PoC — DepthFirstDisclosures/Nginx-Rift
- Vendor advisories — CVE-2026-42945 (rift) and CVE-2026-9256 (PoolSlip), F5/nginx
Notes
Mirrored from https://github.com/y198nt/Nginx-chain-Rift-Poolslip on 2026-07-05. Flagged during vetting as “unverified quality” due to sophisticated hardcoded-looking glibc/heap offsets and distinctive branding (“Rift”/“PoolSlip”); assessed as UNCLEAR-leaning-REAL, backed by a public hackmd writeup and functioning against a fully reproducible, self-contained local Docker lab.
| |