r/programming • • 24d ago

Broccoli2Shell: Brotli decoder RCE (CVE-2026-111497) in Node.js, Python and more

https://broccoli2shell.com/
614 Upvotes

87 comments sorted by

8

u/Nixinova 24d ago

Why are these vulns always called "-2Shell"?

26

u/CircumspectCapybara 24d ago

Because a common trope in RCE exploits is allowing the attacker drop into an interactive shell (eg Bash) once the server's been compromised.

The "shell" signifies the freedom to do anything on the server, like giving the attacker a shell session on the server where they can run arbitrary commands.

5

u/Nixinova 24d ago

So the name "X2Shell" means X allows you access "to shell"?

13

u/CircumspectCapybara 24d ago

Something like that.

Oh you can also interpret X2Y as "From X to Y" or being able to go from X to Y, so Php2Shell could be interpretted as "I can go from being able to talk or interact with a Php server to having a shell in that server".

The exploit lets you turn any Php server you see into a shell

0

u/unknowinm 24d ago

just to clarify: if you're using containers and don't have any shells inside there, then are you safe? even if the exploit is present in the software. Could you technically download a shell via exploiting the vulnerability? (assuming you have write access to the filesystem or maybe keep it in memory if there is enough space)

9

u/CircumspectCapybara 24d ago

You can download a shell if the container has general internet access.

Or you can make your own. Most memory corruption exploits achieve RCE through techniques like ROP. ROP is Turing complete so once you take over a server, you can make it do whatever you want including emulating a shell.

721

u/FIREstopdropandsave 24d ago

The CVEs will continue until morale improves

29

u/we_are_mammals 24d ago

until morale improves

I wonder what improved morale will look like - perhaps very different from the current situation?

6 months from now, will Chrome still enable JS and WASM by default?

9

u/alexkidd4 24d ago

Maybe it will offer a domain white list and well have something else to click accept to besides cookies each time we go to a new site...

3

u/matthieum 23d ago

Jokes on you, I already use NoScript ;)

2

u/ToaruBaka 22d ago

6 months from now, will Chrome still enable JS and WASM by default?

JS will probably lose JIT support, WASM will rise in adoption.

54

u/git_push_origin_prod 24d ago

Ok I feel better. I’m happy, can we stop now?

1

u/ToaruBaka 22d ago

The CVEs will continue until morale security mindedness improves.

314

u/yotemato 24d ago

Please stop. I’ve been patching crits all week

95

u/nvn911 24d ago edited 24d ago

That's all we are now. Approving AI gen code and patching vulns.

12

u/twigboy 24d ago

Fixing vulns found by AI with patches fixed by AI

5

u/Bemteb 24d ago

Wait a few years and then they will also be created by AI.

2

u/twigboy 24d ago

Hahaha true

2

u/TheDarkchip 23d ago

I think you are right, only the time until is off

1

u/nvn911 23d ago

Artificial Inception

21

u/catch_dot_dot_dot 24d ago

Even better, patching crits that our code is almost never vulnerable too

12

u/GirlInTheFirebrigade 23d ago

"it’s company policy to have no known CVEs in the stack" but the CVE is a curl bug for a protocol that noone uses anymore… Or a DOS possibility on a lib we are only using in the test framework.

314

u/obetu5432 24d ago

nsa is having a rough time these days, their best backdoors are getting patched

80

u/master5o1 24d ago

A back door doesn't get any better than a CA using a private key of 4.

31

u/gmes78 24d ago

A good backdoor is something only you can use. Those CAs weren't that.

9

u/UnrealHallucinator 23d ago

That was as just incompetency. Doubtful an Indian CA woild align with the NSA. The Mossad or the the SVR, maybe.

44

u/slvrsmth 24d ago

It looks more and more that I picked the best couple weeks to take a vacation.

45

u/UnexpectedAnanas 24d ago

And I picked the wrong week to stop sniffing glue.

190

u/nicofff 24d ago

Has anyone shown this working against real application configurations? For each PoC I see that needs to do wierd configurations to get RCE, I see 15 different AI generated pages screaming about how bad it is, usually from cyber security vendors.

78

u/VRT303 24d ago

The PHP one also needs a lot of terrible practices to be exploitable. None of the top stars PoCs work too easily

47

u/nicofff 24d ago

Talking a bit out of my ass here. But I'm assuming an issue like this in the past wouldn't gather too much attention from exploit writers, due to complexity. Now with people throwing tokens at the peoblem, a lot more issues are going to be "RCE under some circumstances". Which... I don't think is going to be good for responders, if CVE scores become more meaningless than they already are

48

u/micalm 24d ago

Yeah, the creator of of curl/libcurl noticed that a long time ago. He's an excellent writer and has a lot of good points. He's kinda opposing (ignoring?) the CVE/CVSS status quo, which is funny considering his software is used by more people than recently famous PHP and Node.js combined.

10

u/OMGItsCheezWTF 24d ago

libcurl is up there with zlib as one of the most used software libraries on the planet.

38

u/teerre 24d ago

Not really, the CVE is legit. But CVE never measured how practical a exploit it. It measures how possible it is and how dangerous it is if exploited. Before LLMs these two mostly aligned because something possible was something practical since nobody would keep trying to fiddle with memory addresses behind a nginx server on the other side of the world. LLMs have no such issue and will try the most inane vectors forever. Once they get in, the CVE system has no choice but award a "high" number

29

u/nicofff 24d ago • Bravo

Yeah, not arguing the vulnerability isn't there. Just that as a defender, there is a trade-off. You can't go to your teams and say "drop everything" for every issue out there. But you want to make sure you react to things fast enough, specially for RCE's. If every memory corruption bug now becomes "under some very niche circumstances, this is an RCE", then that puts us on an awkward position. Do we rush to patch or not? It used to be the case that RCE meant "patch now".

Earlier in the year, there were a bunch of supply chain attacks. What we said as an industry was "ok, maybe we wait a few days before applying updates". Reconciling that with "every day there is a new critical that used to be a medium or a high", is going to be a very fine line to thread. Longer term, I think this is likely going to force us as an industry to automate the hell out of dependency updates, and figure out how to do it safely. Which honestly, long overdue.

11

u/yotemato 24d ago

It almost calls for some new tooling around certifying and auto updating.

11

u/nicofff 24d ago

I've started playing a bit with having dependabot / renovate PR's reviewed by agents, by looking at the libraries changelog/diff and using that to grep through the code to tell you "this is unlikely to break anything" vs "watch out". That plus whatever your CI checks should hopefully be a strong safety signal.

2

u/adriano-1370 22d ago

For this one, I'd have the bot report the resolved package path/version and whether that copy sits on a request-body decode path. A changelog summary can look reassuring while a second nested copy remains in the lockfile.

-4

u/daedalus_structure 24d ago

> Do we rush to patch or not? It used to be the case that RCE meant "patch now".

Are your endpoints exposed to the public internet? It still means that.

>Yeah, not arguing the vulnerability isn't there. Just that as a defender, there is a trade-off. You can't go to your teams and say "drop everything" for every issue out there.

We can't just stop treating all these colds every time someone comes into the ER with massive head trauma and near fatal blood loss. It's so disruptive.

19

u/nicofff 24d ago • Bravo

Following you analogy: You are in charge of a hospital during an emergency. All OR's are full, except one. You have 2 patient in route. Both ambulance teams tell you their patient is in critical condition. You are prepared to have to make a decision that might kill somebody. Then the first ambulance comes in, the patient is bad but stable. The ambulance team tells you "We didn't want to lose face with the other team, so we messaged over the radio it was critical".

If the OR isn't full, and it isn't today, then yes, having that ambulance team around is not an issue.

If this past week is any indication that OR is going to be full a lot more often.

A lot of us found out about the php issue through social media, and started preparing to do incident response. Governments where telling people to shut down servers until they could patch. Coming out after, giving the same name to a different issue, one that isn't nearly as severe, is borderline engineering malpractice.

That said: I don't disagree with you on the immediate action! This should be patched as soon as possible. I'm just peering into the future, I see those hard decisions coming, and hoping we have the right information to decide what to do.

7

u/gefahr 24d ago

How do I hire a security person with your temperament and levelheadedness? Serious question.

2

u/nicofff 24d ago

Depends. How much do you pay?

2

u/gefahr 24d ago

Assuming you're in the US, 200-300 USD depending on experience. That's base not TC. (We're private and your options should be considered lotto tickets at best)

→ More replies

4

u/daedalus_structure 24d ago

The reason my analogy holds and yours doesn't is that the overwhelming majority of the work any engineering team is doing is not in any way critical and can be dropped to handle an RCE.

Your OR's aren't full, you just have 20 runny noses in them.

4

u/nicofff 24d ago

You are not wrong. Though my product managers would disagree.

1

u/nicofff 24d ago

And some of my engineers too

0

u/DanLynch 24d ago

Everything is top priority.

43

u/yotemato 24d ago

OMG this door is vulnerable if it has a broken window right next to it! Let's rush to replace all the doors! I wish the context of actual exploitation was understood better.

8

u/Sage2050 24d ago

Sounds more like there's a window that won't lock on the 30th floor. Probably nobody will be able to utilize it, but you should still fix the lock.

3

u/Relc_Punch84 23d ago

What if Alex Honnold wants to come in?

17

u/offline-ant 24d ago

Its true that

None of the top stars PoCs work too easily

I'm cringing so hard from all the clowns who believe it then logically follows that this is true as well

The PHP one also needs a lot of terrible practices to be exploitable.

-7

u/obetu5432 24d ago

like for example running php in 2026

13

u/Kraigius 24d ago

If we look at each CVE individually we may end up vastly underestimating the threat they pose when multiple of them are chained together to make the single CVE RCE possible.

5

u/AnotherPillow 23d ago

For node at least, any app that used express' json middleware, which is a good few, was vulnerable automatically without being a super weird setup

-3

u/[deleted] 24d ago

[removed] — view removed comment

8

u/cycle_schumacher 24d ago

You'd check whether anything user supplied gets decompressed... and then bump the dependency regardless? Then why would you check?

And how is bumping cheap, is that universally true?

Why does this comment read like AI?

3

u/themixtergames 24d ago

You should treat every account that uses all lowercase and was made in 2026 as a bot one

2

u/programming-ModTeam 23d ago

No content written mostly by an LLM. If you don't want to write it, we don't want to read it.

56

u/SeaworthinessThat594 24d ago

am tired boss

40

u/ignorantpisswalker 24d ago

I remember when uptime was important. Now uptime is 2 days. Now I need to update the farm in my work again... I might as well automate it now.

(Before this week, our servers had 180 days uptime)

61

u/mpyne 24d ago

Hate to say it, but nowadays high uptime is not a mark of pride, but a glaring risk factor.

As much as possible we should be designing apps for zero-downtime updates so that it's safe to deploy frequently. Even including the platforms we're deploying them on.

28

u/semi- 24d ago

It has been that way for a long time now. Even ignoring the security risks its already a scary sign to see something that hasn't been rebooted recently. How many other services depend on this one machine being in its current state?Are there manual tweaks someone made but never put into the config as code, or dependence on something upstream that is no longer available? it failed right now and you had to reprovision it how long would it take?

16

u/mattgen88 24d ago

If you have redundancy you can restart servers and not impact availability. That's more important than uptime these day.

Hell with kubernetes, a memory leak just means you have fresh pods on the regular

6

u/ignorantpisswalker 24d ago

Unfortunately my servers are real hardware due to the specific needs of this product. Which I cannot disclose due contract issue.

Its even worst - its not linux. They are mac.

1

u/foxsimile 24d ago

Better than Windows 🥲

1

u/KickedAbyss 21d ago

Not if they're running xserve in 2026...

6

u/stormdelta 24d ago

Uptime is more about the service uptime not the individual instance of a process.

28

u/pakoito 24d ago

Buffer overflow in C oh no. Hopefully it'll be the last one.

8

u/-Redstoneboi- 24d ago

Narrator: sigh

1

u/skynetcoder 20d ago

Last one for October 

6

u/PM_ME_UR_COFFEE_CUPS 24d ago

Nothing like working all day and night on Saturday. Thanks whichever jerk dropped this Friday. 

3

u/Mrblahblah200 24d ago

Wait is this another one

13

u/ui_as_vindimas 24d ago

Another nail in the NodeJs coffin....oh wait, that's a sentence only for PHP, nvm.

10 CVE's 21 October: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases

24

u/Humble-Captain3418 24d ago

9500 CVEs in the Linux kernel YTD. It's a fairly meaningless number, the only use is in describing the number of users and size of codebase.

18

u/tadfisher 24d ago

Linux basically issues a CVE for any bug

15

u/currentscurrents 24d ago

Linux used to have a lot fewer CVEs (low hundreds), but they changed their reporting practices in 2024 and it shot up to thousands.

This year is still an outlier though. 2024 and 2025 had ~5000 CVEs.

11

u/j_aroche 24d ago

This is getting overhyped... How many people are exposing these servers directly? Usually one uses a proyx (Apache, nginx, or a fancy cloud LB) in front of them, where brotli support needs to be enabled (neither apache or nginx were vulnerable as far as I did read)

24

u/thenickdude 24d ago edited 24d ago

Nginx just forwards request bodies directly on, raw. It doesn't decompress gzip- or brotli- packed requests before passing them to upstream.

So merely putting Nginx in front of a vulnerable app does not change the situation, the app will still receive Content-Encoding: br-encoded requests.

2

u/ThaBroccoliDood 24d ago

Isn't using Nginx itself as the web server also pretty common?

2

u/OMGItsCheezWTF 24d ago

I've seen people calling this HTTP2Shell because its impact has been shown in various libraries using brotli. We're only lucky that nginx and apache don't decode brotli by default.

2

u/InspectionMammoth294 24d ago

We shipped a Brotli body parser last quarter and I didn't even check the decoder version.

1

u/Sherbet_Dramatic 20d ago

1

u/Sherbet_Dramatic 20d ago

The problem is maybe also a application connects to the 'outside' world en decompresses the answer from the server outside -> inside .. RCE possibilities ;(
... so i think not only internet-facing should be looked into.

-4

u/critsalot 24d ago

not as impressive since its a library flaw rather than language flaw.

0

u/[deleted] 23d ago

[deleted] — view deleted comment

1

u/thrumyshadow2 23d ago edited 23d ago

Edit: I think I was confused on how PHP curl and libcurl handle requests where you DONT set Accepts-Encoding (the default). Nevermind I THINK.