Denial of service and source code exposure in React Server Components

(react.dev)

Comments

simonw 11 December 2025
React Server Components always felt uncomfortable to me because they make it hard to look at a piece of JavaScript code and derive which parts of it are going to run on the client and which parts will run on the server.

It turns out this introduces another problem too: in order to get that to work you need to implement some kind of DEEP serialization RPC mechanism - which is kind of opaque to the developer and, as we've recently seen, is a risky spot in terms of potential security vulnerabilities.

WatchDog 12 December 2025
When I looked into RSC last week, I was struck by how complex it was, and how little documentation there seems to be on it.

In fairness react present it as an "experimental" library, although that didn't stop nextjs from widely deploying it.

I suspect there will be many more security issues found in it over the next few weeks.

Nextjs ups the complexity orders of magnitude, I couldn't even figure out how to set any breakpoints on the RSC code within next.

Next vendors most of their dependencies, and they have an enormously complex build system.

The benefits that next and RSC offer, really don't seem to be worth the cost.

chuckadams 11 December 2025
I remember when the point of an SPA was to not have all these elaborate conversations with the server. Just "here's the whole app, now only ask me for raw data."
tagraves 11 December 2025
It's really concerning that the biggest, most eye-grabbing part of this posting is the note with the following: "It’s common for critical CVEs to uncover follow‑up vulnerabilities."

Trying to justify the CVE before fully explaining the scope of the CVE, who is affected, or how to mitigate it -- yikes.

hbbio 12 December 2025
We pioneered a lot of things with Opa, 15 years ago now. Opa featured automatic code "splitting" between client and server, introduced the JSX syntax although it wasn't called that way (Jordan at Facebook used Opa before creating React, but the discussions around the syntax happened at W3C notably with another Facebook employee, Tobie).

Since the Opa compiler was implemented in OCaml (we were looking more like Svelte than React as a pure lib), we performed a lot of statical analysis to prevent the wide range of attacks on frontend code (XSS, CSRF, etc.) and backend code. The Opa compiler became a huge beast in part because of that.

In retrospect, better separation of concerns and foregoing completely the idea of automatic code splitting (what React Server Components is) or even having a single app semantics is probably better for the near future. Our vision (way too early), was that we could design a simple language for the semantics and a perfect advanced compiler that would magically output both the client and the server from that specification. Maybe it's still doable with deterministic methods. Maybe LLMs will get to automatic code generation of all parts in one shot before.

hollowturtle 11 December 2025
Wouldn't make more sense keeping React smaller and left those features to frameworks? I liked it more when it was marketed as the View in MVC. Surely can still be used like that today but it still feels bloated
dizlexic 12 December 2025
I'm not going to let go my argument with Dan Abramov on x 3 years ago where he held up rsc as an amazing feature and i told him over and over he was making a foot gun. tahdah!

I'm a nobody PHP dev. He's a brilliant developer. I can't understand why he couldn't see this coming.

sangeeth96 11 December 2025
Next team just published this: https://nextjs.org/blog/security-update-2025-12-11

Seems to affect 14.x, 15.x and 16.x.

_heimdall 11 December 2025
I do hope this means we can finally stop hearing about RSC. The idea is an interesting solution to problems that never should exist in the first place.
delifue 12 December 2025
React server component is frontend's attempt of "eating" backend.

On the contrary, HTMX is the attempt of backend "eating" frontend.

HTMX preserves the boundary between client and server so it's more safe in backend, but less safe in frontend (risk of XSS).

kpozin 12 December 2025
A framework designed to blur the line between code running on the client and code running on the server — forgot the distinction between code running on the client and code running on the server. I don't know what they expected.

(The same confusion comes up regularly whenever you touch Next.js apps.)

bflesch 11 December 2025
So we have a new React CVE and tomorrow is Friday, so please be prepared for a new outage brought to you by the super-engineers at Cloudflare.
dzonga 12 December 2025
react server components is something that should've never existed anyway.

are people shipping faster due to them ? or it's all complexity, security vulnerabilities like this. you're not facebook. render html the classic way if you need server rendered html. if you really do need an SPA - which is 5% of the apps out there - then yeah use client side react, vue, svelte etc - none of those RPC server actions etc

bitbasher 11 December 2025
I remember when my greatest fear was sql injection. It’s great to see we have become more secure with our technology.
nathants 12 December 2025
Just exchange json.

Backend in python/ruby/go/rust.

Frontend in javascript/typescript.

Scripts in bash/zsh/nushell.

One upon a time there was a low amount of friction and boilerplate with this approach, but with Claude and Codex it’s changed from low to none.

ManuelKiessling 12 December 2025
I really wonder why the swarm intelligence of software developers still hasn’t decided on a single best clearly defined architecture for serving web applications, decades after the building blocks have been in place.

Let the server render everything. Let JS render everything, server is only providing the initial div and serves only JSON from then on. Actually let JS render partial HTML rendered on the server! Websockets anyone?

Imagine SQL server architecture or iOS development had this kind of ADHS syndrome.

yread 11 December 2025
Were there not enough eyes on React Server Components before the patches from last week?
LittleOtter 12 December 2025
Our team is working to fix our Next.js project.It's so painful.

Now I'm doubting RSC is a good engineering technology or a good practice.The real world is tradeoffs: RSC really help us improve our develop speed as we have good teamates that has good understanding of fullstack.

Do hope such things won't happen again.

metta2uall 12 December 2025
For the vast majority of projects it seems like the disadvantages of these highly complex RPC systems far exceed the benefits... Not just in terms of security but also the reduced observability compared to simple JSON..
greatgib 12 December 2025
In my point of view, this is well deserved to idiots that are seriously using RSC in production, despite that being a very bad idea...
ydj 12 December 2025
I noticed requests that were exploiting the vulnerability were turning into timeouts pretty much immediately after rolling out the patch. I’m surprised it took so long for it to be announced.
delifue 12 December 2025
Any attempt that blurs boundary between client and server is unsafe.
rikafurude21 11 December 2025
Im confused, did the update from last week for the RCE bug also include fixes for these new CVEs or will I need to update again? npm audit says theres no issues
hedayet 11 December 2025
I wonder what does these vulnerabilities mean for Facebook. As per my knowledge, Facebook's the biggest web app written in React.
ginkgotree 11 December 2025
I'm only surprised it took this long for an exposure of backend data to the front end to be discovered in RSC
aatd86 11 December 2025
LOL. I must have divination powers. I am currently working on a UI framework and opened an issue just 3 weeks ago that says:

***

Seems that server functions are all the rage. We are unlikely to have them.

The main reason is that it ties the frontend and the backend together in undesirable ways.

It forces a js backend upon people (what if I want to use Go for instance).

The api is not client agnostic anymore. How to specify middleware is not clear.

Requires a bundler, so destroys isomorphism (isomorphic code requires no difference between the client and the server/ environment agnostic).

Even if it requires a bundler because it separates client and server implementation files, it blurs the data scoping (especially worrying for sensitive data) Do one thing and do it well: separate frontend and backend.

It might be something that is useful for people who only plan on having a javascript web frontend server separate from the API server that links to the backend service.

Besides, it is really not obvious to me how it becomes architecturally clearer. It would double the work in terms of security wrt authorization etc. This is at least not a generic pattern.

So I'd tend to go opposite to the trend and say no. Who knows, we might revisit it if anything changes in the future.

***

And boy, look at the future 3 weeks later...

To be fair, the one good thing is that they are hardening their implementation thanks to these discoveries. But still seems to me that this is wholly unnecessary and possibly will never be safe enough.

Anyway, not to toot my own horn, I know for a fact these things are difficult. Just found the timing funny. :)

rvz 11 December 2025
React patches one vulnerability and two more are revealed, just like a Hydra.

At this point you might as well deprecate RSC as it is clearly a contraption for someone trying to justify a promotion at Meta.

Maybe they are going to silently remove “Built RSC at Meta!” in their LinkedIn bios after this. So what other vulnerabilities are going to be revealed in React after this one?

scotty79 23 hours ago
Language with dynamic code evaluation on the server plus fat client-setver protocol that attempts to sync raw objects of the language. What could have gone wrong?

I wonder if similar magic fat pipe technologies (like Blazor) have similar vulnerabilities waiting to be discovered. Maybe compiled languaged are safer by default in this scenario, but anything built in Python, PHP, Ruby or any "code is data" language would probably fare similarly poorly.

aabhay 12 December 2025
“use insecure”
TZubiri 12 December 2025
Interesting how DoS ranks higher than code exposure in severity.

I personally think it's the other way around, since code exposure increases the odds that a security breach happens, while DoS does not increase chances of exposure, but affects reliability.

Obviously we are simplifying a multidimensional severity to one dimension, but I personally think that breaches are more important than reliability. I'd rather have my app go down than be breached.

And I don't think it's a trivial difference, if you'd rather have a breach than downtime, you will have a breach.

jgalt212 12 December 2025
I remember some podcast interview with Miško Hevery talking about how Qwik was very emphatic about what code ran on the server and what ran on the client. Seems self-evident and prescient. It was a great interview as Miško Hevery is extremely articulate about the problems at hand. If I find it, I'll post.
shadowgovt 11 December 2025
Oh boy, I somehow missed that React was offering these.

Google has a similar technology in-house, and it was a bit of a nightmare a few years back; the necessary steps to get it working correctly required some very delicate dancing.

I assume it's gotten better given time.

ChrisArchitect 11 December 2025
Related:

React2Shell and related RSC vulnerabilities threat brief - Cloudflare

https://blog.cloudflare.com/react2shell-rsc-vulnerabilities-... (https://news.ycombinator.com/item?id=46237515)

ashishb 11 December 2025
The JavaScript fanatics will downvote me for saying this, but I'll say this, "using a single JavaScript codebase on your client-side and server-side is like cooking food in your toilet, sooner or later, contamination is guaranteed" [1]

1 - https://ashishb.net/tech/javascript/

carlcortright 11 December 2025
dammit
phplovesong 12 December 2025
SSR is just dumb. Its very rare that you would benefit much from this approach, the only thing you get an complexity bomb exploding in your face.

How about either just return html (maybe with htmx), or have a "now classic" SPA.

The frontend must be the most over engineered shitshow we as devs have ever created. Its where hype meets the metal.

tills13 12 December 2025
Y'all are so pessimistic. React Server Components are great. React is a complex piece of software. Bugs happen.
rickhanlonii 11 December 2025
After Log4Shell, additional CVEs were reported as well.

It’s common for critical CVEs to uncover follow‑up vulnerabilities because researchers scrutinize adjacent code paths looking for variant exploit techniques to test whether the initial mitigation can be bypassed.