r/devsecops • • Oct 28 '26

I recreated a Node2Shell RCE attack in the form of an interactive exercise

On 21 October 2026, Google released patched versions of its Brotli compression library for CVE-2026-111497, a vulnerability nicknamed Node2Shell. It is an out-of-bounds write in the Brotli decoder. Node and many Python stacks bundle Brotli, so it may not show up in a scan of package.json or the host's packages.

I made an interactive, hands-on lab exercise on this vulnerability. The goal is to give engineers a general overview of the attack vector and the mitigation steps. You'll exploit it as an attacker, then switch roles to the defender's side: find every place Brotli is decoded, upgrade the runtimes, redeploy, and rotate the leaked token.

I did my best to highlight all the details, but if you notice any issues or inconsistencies, please let me know!

https://ransomleak.com/exercises/http2shell-rce/

10 Upvotes

7 comments sorted by

2

u/extreme4all Oct 28 '26 edited Oct 28 '26

Throwing out the question here but doesn't brotli need to be explicitly enabled in most frameworks?!

1

u/facoortaen Oct 28 '26

most modern HTTP clients advertise br in the accept-encoding header automatically now, so if your app fetches anything external the decoder is already in play

1

u/extreme4all Oct 29 '26

Fetches yeah i noticed that, are you fetching from untrusted sources?

1

u/Successful-Sound9270 Oct 30 '26

the fixing half is the useful bit, since a bundled library won’t show up in a package.json scan. an sbom built from the running image, plus a check of the runtime version, finds copies a manifest scan misses..

1

u/Wise_Pomegranate146 5d ago

Really like the attacker to defender approach here . One important take away is that vulnerability in bundled Or transitive dependencies can easily slip past traditional dependency scans , especially when the vulnerable component is part of the runtime rather than an explicitly declared package. It's worth checking the actual runtime/container image, SOBM, and dependency version during remediation, not just the application manifest . This is also where tools like RapidFort can helps teams get better visibility into what's actually present in their container images and prioritize remediation.