New Nginx Exploit
73 points by hetsaraiya 2 hours ago | 23 comments

RagingCactus 21 minutes ago
As a security person it is tiring to see so many people here either directly claim or at least allude to the claim that this is somehow much less scary because the _published_ exploit does not bypass ASLR. The writeup claims there is a way to reliably bypass ASLR with this attack. And that is a good default assumption I would be willing to believe without evidence.

ASLR is a defense-in-depth technique intended to make exploitation more difficult. In almost all cases it is only a matter of time and skill to also include an ASLR bypass. Both requirements continue being lowered by LLM agents every few weeks. It is only a matter of time (and probably not a lot of time) until a fully weaponized exploit is developed. It may be published, it may also be kept private.

It is straight up wrong to say "if you have ASLR enabled, you're not at any risk from this" and saying this is extremely harmful for anyone that trusts claims like that.

This wrong belief that you shouldn't care about security vulnerabilities because mitigations may make exploitation more difficult has already caused so much harm in the past. Be glad that modern mitigations exist, but patch your stuff asap. If you are a vendor, do not treat vulnerability reports as invalid because the researcher has not provided an ASLR bypass. Fix the root cause and hope mitigations buy you enough time to patch before you get owned.

reply
danslo 40 minutes ago
This one's pretty bad but there are some preconditions.

Requires a "rewrite" directive with a questionmark in the replacement string, and then a subsequent "set" directive that references a regex capture group (e.g. set $var $1).

Also the POC assumes ASLR is disabled.

reply
dsr_ 36 minutes ago
Does any distro disable ASLR by default?

If you were to do it by hand, nginx doesn't come to mind as a likely candidate.

reply
neomantra 22 minutes ago
The official F5 page is here: https://my.f5.com/manage/s/article/K000161019

As noted elsewhere, ASLR protects you. While you are waiting for your affected platform to get the fix, they note the mitigation:

"use named captures instead of unnamed captures in rewrite definition"

"To mitigate this vulnerability for this example, replace $1 and $2 with the appropriate named captures, $user_id and $section"

F5 patched 1.31.0 and 1.30.1.

OpenResty has a patch for 1.27 and 1.29: https://github.com/openresty/openresty/commit/ee60fb9cf645c9...

You can track OpenResty's (a Lua application server based on Nginx) progress here: https://github.com/openresty/openresty/issues/1119

reply
jcalvinowens 36 minutes ago
reply
linkregister 30 minutes ago
Worker processes are forked from the master, which means they receive the same memory layout. You get unlimited crashes against the worker. There's probably a way to exploit that to get a read oracle. At the very least this is a reliable denial of service.

Depth First's full writeup: https://depthfirst.com/research/nginx-rift-achieving-nginx-r...

reply
jcalvinowens 13 minutes ago
Sure, but I think the github README ought to make it more clear the POC as-is doesn't work against nginx on any current Linux distro.
reply
panzi 30 minutes ago
Does Debian 12 have this patched? But I guess I'm not affected if I don't use `rewrite` or `set` anywhere?
reply
stephenlf 58 minutes ago
Crap
reply
Twirrim 45 minutes ago
Given it relies on ASLR being disabled, it's extremely unlikely you're at any risk from this.
reply
hmokiguess 50 minutes ago
I read that in my own voice, so relatable hahahaha
reply
FlyThruTheSun 31 minutes ago
[dead]
reply
kitsune1 8 minutes ago
[dead]
reply
hetsaraiya 2 hours ago
Just saw this pop up — full public PoC for CVE-2026-42945 ("NGINX Rift"), a heap buffer overflow in NGINX's ngx_http_rewrite_module that's been there since 0.6.27 (2008).

It triggers on a very common pattern: a `rewrite` directive (with an unnamed capture like $1/$2 and a `?` in the replacement string) followed by `set`, `if`, or another `rewrite`. The root cause is a classic two-pass script engine bug (length calculation vs. actual copy pass with ngx_escape_uri).

The PoC turns it into unauthenticated RCE using cross-request heap feng shui + pool cleanup pointer corruption. Tested with a simple Docker setup.

- Repo + Python exploit: https://github.com/DepthFirstDisclosures/Nginx-Rift - Full technical write-up: https://depthfirst.com/research/nginx-rift-achieving-nginx-r... - F5 advisory + patches (1.31.0 / 1.30.1 for OSS, plus Plus updates): https://my.f5.com/manage/s/article/K000160932 (or the latest K000161019)

Affects basically any NGINX doing URL rewriting in front of apps/PHP/etc. Workaround mentioned is switching to named captures.

The discovery angle is also interesting — it was found autonomously by depthfirst's security analysis tool after one-click onboarding of the NGINX source.

Anyone running NGINX in production using rewrite rules? How are you checking your configs? Thoughts on the exploit chain or the AI-assisted finding process?

reply
jmaw 52 minutes ago
Wow, coming from the webdev world. It is so funny seeing NGINX, one of the widest used web servers in the world, on version 1.x. React is on version 19. Really shows how differently new vs. old software is designed and built, and not necessarily in a good way.

https://world.hey.com/dhh/finished-software-8ee43637 https://josem.co/the-beauty-of-finished-software/

reply
0x457 34 minutes ago
That's because nginx doesn't break things for end user every release, so there is no reason to bump major version.
reply
embedding-shape 31 minutes ago
I bet nginx doesn't even follow semantic versioning, which you seem to be talking about.
reply
chasd00 33 minutes ago
anyone can choose any version string convention they want for their project. Comparing two different pieces of software by their version string doesn't make sense.
reply
syoc 35 minutes ago
I guess someone need to update https://0ver.org/ then.
reply
ranger_danger 42 minutes ago
I chalk that up more to different versioning schemes rather than how much work is being done. If nginx changed whole numbers like react did, I bet it would be even higher.
reply
joecool1029 48 minutes ago
lighttpd still around too, on 1.4.82, not too much changed there.
reply
ranger_danger 41 minutes ago
They've been working on version 2.0 for many years now as well, I wonder when they think a release might happen.
reply
shooly 35 minutes ago
> not necessarily in a good way

How do you think versioning works? You know that it's completely arbitrary and up to the author, right? Very ironic comment.

reply