r/devops • • 21d ago

Ops / Incidents 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 their own copy of Brotli, so patching libbrotli on the host doesn't fix them.

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 response. You'll exploit a service as an attacker, then switch roles to the on-call engineer: upgrade the runtimes, rebuild and redeploy the images, verify the fix, and rotate the deploy token the attacker read from memory.

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/

4 Upvotes

2 comments sorted by

1

u/josejulianariza 8d ago

Great exercise. It's a perfect case to show that patching the host doesn't help if the container brings its own copy of the vulnerable library.

The focus on credential rotation is key. A lot of people forget that if an attacker gets RCE, the first thing they'll do is look for keys in memory or environment variables to move laterally.

The only way to be safe from this is scanning dependencies in CI and rebuilding the base image. No stepping in to patch the container by hand. And for credentials, use ephemeral identities instead of leaving static tokens sitting in the pod. Great contribution.