Top
Best
New

Posted by hetsaraiya 19 hours ago

New Nginx Exploit(github.com)
391 points | 88 commentspage 2
ChrisArchitect 19 hours ago|
Better links:

https://depthfirst.com/research/nginx-rift-achieving-nginx-r... (https://news.ycombinator.com/item?id=48126029)

https://depthfirst.com/nginx-rift (https://news.ycombinator.com/item?id=48123365)

geophph 16 hours ago||
Someone tell LowLevel
trilogic 15 hours ago||
Good to know, thanks. Wondering how long to the next.
AmmyTang 5 hours ago||
[dead]
FlyThruTheSun 19 hours ago||
[dead]
kitsune1 18 hours ago||
[dead]
jhatemyjob 17 hours ago||
tl;dr If you don't use ngx_http_rewrite_module, you're fine

Honestly it's such a weird feature, if you're doing complicated redirects like this in nginx where PCRE is necessary, you should do it in your application code. And if you need speed use ngx_http_lua_module.

tredre3 15 hours ago||
Your opinion is that if, for a godforsaken reason, someone needs to rewrite URLs in their web server, they should avoid PCRE (something designed for string manipulation) because it's overkill, and they should use Lua (a full programming language) instead?

Am I understanding you correctly?

GoblinSlayer 2 hours ago|||
Because lua supports string manipulation without buffer overflows.
jhatemyjob 14 hours ago|||
Yes.
PaulDavisThe1st 17 hours ago||
We do this for 3 sub-domains of ardour.org; there's no application code involved, because we're rewriting historical URLs to their current form, and the "application" doesn't do that or need to do that or need to know about that.
jhatemyjob 14 hours ago||
Why not 302 instead?
hetsaraiya 19 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?

stephenlf 19 hours ago|
Crap
hmokiguess 19 hours ago||
I read that in my own voice, so relatable hahahaha
Twirrim 19 hours ago||
Given it relies on ASLR being disabled, it's extremely unlikely you're at any risk from this.
bink 15 hours ago|||
The exploit they chose assumes ASLR is disabled for simplicity's sake, but if you read the full writeup they say they could've used the vulnerability to map memory layout. It's nice to have ASLR but some types of vulnerabilities can be used to bypass it.
Tepix 18 hours ago|||
That‘s wishful thinking
More comments...