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.<p>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.<p>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.<p>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.
No remotely reachable vuln should be taken lightly.<p>At the moment though, the preconditions look odd. I've been using nginx in various constellations for 10 years and never once combined rewrite and set.
> 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.<p>I disagree with this take, or I would at least phrase it differently. ASLR is like an extra password you need to guess. It has certain amount of entropy and it is usually stable. Unless vulnerability has a portion that leaks information, ASLR completely mitigates it - or you need a second vulnerability. And that is a different conversation. ASLR can completely mitigate individual vulnerability, but not possibly exploit chain.<p>I would use the argument of possible second vulnerability that leaks information for making people patch quickly anyway. But exploit chains are risk for all kinds of vulns.
> 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.<p>You can safely assume a 1:1 overlap between the people that claim "AI will solve cyber" (and they always say 'cyber') and the people saying this.
> and saying this is extremely harmful for anyone that trusts claims like that.<p>Kind of feels like the burden is on the one who is reading it though, good luck stopping people from spreading misinformation on the internet, most of them don't even know they're wrong.<p>What's extremely harmful is trusting random internet comments stating stuff confidently. Get good at seeing through that, and it'll serve you well in security and beyond.
yeah when I read these RCE reports about public-facing software that I know about I usually upgrade them within minutes of reading the report that's why I read these reports and you really have to take them seriously because otherwise your machine gets compromised, sooner rather than later... it seems like lately there's been no advance notice on a lot of these RCE exploits that are publicly released, I mean come on guys at least give us a few minutes to upgrade our software before releasing the exploit, it feels like the late 1980s early 1990s when there was no guardrails on disclosure, i.e. all the remotely exploitable sendmail bugs. people who fail to read these reports or read them too late wind up having millions of machines being compromised because of it. currently nginx has about a 39% - 43% share of the public facing web server market today, so its pretty serious.
This one's pretty bad but there are some preconditions.<p>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).<p>Also the POC assumes ASLR is disabled.
Example: <a href="https://github.com/DepthFirstDisclosures/Nginx-Rift/blob/main/env/nginx.conf#L39" rel="nofollow">https://github.com/DepthFirstDisclosures/Nginx-Rift/blob/mai...</a>
Does any distro disable ASLR by default?<p>If you were to do it by hand, nginx doesn't come to mind as a likely candidate.
Not the person you asked but I am not aware of any that disable ASLR by default, though most default to 1 which only enables ASLR for applications compiled to enable it <i>vs 2 forcing it on or 3 on some distributions that use a hardened kernel</i>. Rather than trusting any assumptions I prefer to run checksec [1] on every OS I touch. It's an old script but works just as well today as it did long ago. One may find that some applications are missing some basic hardening compile time options. The script is not an exhaustive test of all modern hardening options. Example of ASLR being forced on:<p><pre><code> # sysctl kernel.randomize_va_space
kernel.randomize_va_space = 2
</code></pre>
Typical invocation:<p><pre><code> checksec.sh --proc-all
</code></pre>
This invocation will list the status of RELRO, Stack Canary, NX/PaX, PIE of all running daemons. My CachyOS installation for example is missing Stack Canaries for all daemons.<p><pre><code> checksec.sh --fortify-proc 732
* Process name (PID) : sshd (732)
* FORTIFY_SOURCE support available (libc) : Yes
* Binary compiled with FORTIFY_SOURCE support: N
</code></pre>
Some additional compile time hardening options [2] and discussion [3]. Even Rust apparently has some compile time security related options.<p>[1] - <a href="https://www.trapkit.de/tools/checksec/" rel="nofollow">https://www.trapkit.de/tools/checksec/</a> # some Linux repositories already contain "checksec".<p>[2] - <a href="https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html" rel="nofollow">https://best.openssf.org/Compiler-Hardening-Guides/Compiler-...</a><p>[3] - <a href="https://news.ycombinator.com/item?id=43533516">https://news.ycombinator.com/item?id=43533516</a>
I think "rewrite" is rarely used nowadays? Isn't it something from old days of PHP and Apache?
"old days of PHP and Apache" ...<p>Apache still runs about 23-28% of websites (with some measurements suggesting it is pretty close to equal with nginx). PHP is still in use by 70-80% of websites (numbers vary depending on where you look).<p>You make it sound like both pieces of tech are irrelevant. Nothing could be further from the truth.<p>some quick googled examples (like I said other sites' numbers vary, but you get the general idea):<p><a href="https://www.wappalyzer.com/technologies/web-servers/" rel="nofollow">https://www.wappalyzer.com/technologies/web-servers/</a>
<a href="https://kinsta.com/php-market-share/" rel="nofollow">https://kinsta.com/php-market-share/</a>
The official F5 page is here:
<a href="https://my.f5.com/manage/s/article/K000161019" rel="nofollow">https://my.f5.com/manage/s/article/K000161019</a><p>As noted elsewhere, ASLR protects you. While you are waiting for your affected platform to get the fix, they note the mitigation:<p>"use named captures instead of unnamed captures in rewrite definition"<p>"To mitigate this vulnerability for this example, replace $1 and $2 with the appropriate named captures, $user_id and $section"<p>F5 patched 1.31.0 and 1.30.1.<p>OpenResty has a patch for 1.27 and 1.29:
<a href="https://github.com/openresty/openresty/commit/ee60fb9cf645c9573b98e7ba52f0401a11a1e416" rel="nofollow">https://github.com/openresty/openresty/commit/ee60fb9cf645c9...</a><p>You can track OpenResty's (a Lua application server based on Nginx) progress here:
<a href="https://github.com/openresty/openresty/issues/1119" rel="nofollow">https://github.com/openresty/openresty/issues/1119</a>
The POC disables aslr: <a href="https://github.com/DepthFirstDisclosures/Nginx-Rift/blob/main/env/entrypoint.sh#L4" rel="nofollow">https://github.com/DepthFirstDisclosures/Nginx-Rift/blob/mai...</a>
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.<p>Depth First's full writeup: <a href="https://depthfirst.com/research/nginx-rift-achieving-nginx-rce-via-an-18-year-old-vulnerability" rel="nofollow">https://depthfirst.com/research/nginx-rift-achieving-nginx-r...</a>
Is there a good alternative to Apache and Nginx that's written in a memory-safe language and not full of security holes? I briefly looked at Jetty (written in Java) and Caddy (written in Go) but they seem to have a history of vulnerabilities of other types (e.g. shell injection in Jetty) so I'm not sure they would be any better.
Memory safety is good, but does not protect from every threat. In this day and age infrastructure operators should familiarize themselves with proactive defenses, MAC: SElinux and AppArmor. It required much friction earlier, but there are more tools to ease the usage today.<p><a href="https://presentations.nordisch.org/apparmor/" rel="nofollow">https://presentations.nordisch.org/apparmor/</a><p><a href="https://github.com/nobody43/apparmor-profiles/blob/master/nginx" rel="nofollow">https://github.com/nobody43/apparmor-profiles/blob/master/ng...</a><p><a href="https://github.com/nobody43/apparmor-suggest" rel="nofollow">https://github.com/nobody43/apparmor-suggest</a><p>Disclaimer: I'm the author of both repos.
Any software used at the scale of Apache and nginx will have a history of vulnerabilities. The fact they both survived with their market share for so long is a good sign
Right, that's essentially what I'm thinking.<p>On the one hand Apache and Nginx are mature and proven but, being written in C, they will always suffer from memory-safety issues like this one and the recent Apache vulnerabilities.<p>On the other hand, the alternatives are perhaps not as mature and perhaps not implemented as securely as they could be, given that e.g. Caddy had multiple vulnerabilities in its request parsing this year and Jetty's shell injection vulnerability seems easily foreseeable and avoidable. Using a memory-safe language doesn't help much if you then (to take an unrelated but well-known example) implement arbitrary code execution as a feature in the logging library.
Caddy been a breeze to use, bit sucky model with "we have thousands of binaries depending on what combination of plugins you want" instead of a proper plugin system, but if you're building it from source, it's pretty nifty and simple anyways.
That is a consequence of static linking, and an abandoned plugin package that hasn't yet been removed due to backwards compatibility.<p>People keep forgetting that with static linking they are back to 1980's IPC for application extensions, or building from scratch every time they need to reconfigure the application.
Recompiling with the features you want is a great model for a free software project. So much simpler to write and maintain compared to a plugin system that it really makes more sense in a lot of cases.
I've switched to using traefik from caddy. For simple use cases it's a little more verbose in the configuration, but for more involved things like multiple load balancing backends, rewriting paths and headers and so on I've found it really good.
nginx had this defect for a long time too!
Go doesn't support runtime linking, which is why "no plugins" (even though Go docs claim it does, no it doesn't).
Apache and I think Nginx have a huge list of features and stuff. Most alternate http servers limit the scope a lot, so you'd need to specify what features you're interested in.<p>But I haven't seen a whole lot of discussion of http servers in memory safe languages. The big three C-based servers: Apache, Nginx, and lighttpd are all pretty solid... I don't think there's a lot of people interested in giving that up for a new project just because of the language.<p>I'll also add that when you pick up most memory safe languages, you're also picking up their sometimes extensive runtime / virtual machine and all the accoutrements. A Java webserver probably uses log4j because any random Java project probably does, etc.
for LB use cases, HAProxy is doing really well
> Exploitation uses cross-request heap feng shui<p>First time I’ve seen feng shui used in this manner..?
Is there a version of ingress-nginx somewhere with a fix for this?
Does Debian 12 have this patched? But I guess I'm not affected if I don't use `rewrite` or `set` anywhere?
<a href="https://security-tracker.debian.org/tracker/CVE-2026-42945" rel="nofollow">https://security-tracker.debian.org/tracker/CVE-2026-42945</a>
Ubuntu has patched as of this morning. Debian doesn't look like they've patched trixie yet.
Just as a PSA, I found that "nginx -v" was not detailed about the version sufficient to check, but "apt list nginx" gave the full version number that was checkable, and indeed the 24.04 version of this morning (1.24.0-2ubuntu7.8) is patched.
[dead]
I find it very unlikely that anyone using nginx does NOT use `set` at least.<p>Most nginx use cases are to end tls and then pass the request to node/php/go/etc. So, I bet you have at least one set with attacker controller data on a line like 'proxy_set_header X-Host $host;'<p>edit: nvm. aparently named captures are not affect. Unless you have a $1 somewhere, it <i>should</i> be fine.
Good to know, thanks. Wondering how long to the next.
Better links:<p><a href="https://depthfirst.com/research/nginx-rift-achieving-nginx-rce-via-an-18-year-old-vulnerability" rel="nofollow">https://depthfirst.com/research/nginx-rift-achieving-nginx-r...</a> (<a href="https://news.ycombinator.com/item?id=48126029">https://news.ycombinator.com/item?id=48126029</a>)<p><a href="https://depthfirst.com/nginx-rift" rel="nofollow">https://depthfirst.com/nginx-rift</a> (<a href="https://news.ycombinator.com/item?id=48123365">https://news.ycombinator.com/item?id=48123365</a>)
Someone tell LowLevel
[dead]
[dead]
[dead]
tl;dr If you don't use ngx_http_rewrite_module, you're fine<p>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.
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?<p>Am I understanding you correctly?
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.
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).<p>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).<p>The PoC turns it into unauthenticated RCE using cross-request heap feng shui + pool cleanup pointer corruption. Tested with a simple Docker setup.<p>- Repo + Python exploit: <a href="https://github.com/DepthFirstDisclosures/Nginx-Rift" rel="nofollow">https://github.com/DepthFirstDisclosures/Nginx-Rift</a>
- Full technical write-up: <a href="https://depthfirst.com/research/nginx-rift-achieving-nginx-rce-via-an-18-year-old-vulnerability" rel="nofollow">https://depthfirst.com/research/nginx-rift-achieving-nginx-r...</a>
- F5 advisory + patches (1.31.0 / 1.30.1 for OSS, plus Plus updates): <a href="https://my.f5.com/manage/s/article/K000160932" rel="nofollow">https://my.f5.com/manage/s/article/K000160932</a> (or the latest K000161019)<p>Affects basically any NGINX doing URL rewriting in front of apps/PHP/etc. Workaround mentioned is switching to named captures.<p>The discovery angle is also interesting — it was found autonomously by depthfirst's security analysis tool after one-click onboarding of the NGINX source.<p>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?
Crap
I read that in my own voice, so relatable hahahaha
Given it relies on ASLR being disabled, it's <i>extremely</i> unlikely you're at any risk from this.
Looks into the CVE, ah an heap memory corruption, business as usual.
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.<p><a href="https://world.hey.com/dhh/finished-software-8ee43637" rel="nofollow">https://world.hey.com/dhh/finished-software-8ee43637</a>
<a href="https://josem.co/the-beauty-of-finished-software/" rel="nofollow">https://josem.co/the-beauty-of-finished-software/</a>
That's because nginx doesn't break things for end user every release, so there is no reason to bump major version.
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.
Only 19?<p>The venerable unix tool "less" is on v701 and was probably already over 300 before react was born<p><a href="https://github.com/gwsw/less/releases/tag/v701" rel="nofollow">https://github.com/gwsw/less/releases/tag/v701</a>
I guess someone need to update <a href="https://0ver.org/" rel="nofollow">https://0ver.org/</a> then.
Guys, this is what happens when you .useEffect()
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.
lighttpd still around too, on 1.4.82, not too much changed there.
> not necessarily in a good way<p>How do you think versioning works? You know that it's completely arbitrary and up to the author, right? Very ironic comment.