Denial of service and source code exposure in React Server Components
Posted by sangeeth96 16 hours ago
See also: https://blog.cloudflare.com/react2shell-rsc-vulnerabilities-..., https://nextjs.org/blog/security-update-2025-12-11
Comments
Comment by simonw 15 hours ago
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.
Comment by tom1337 15 hours ago
Comment by Uehreka 14 hours ago
Comment by hmcdona1 13 hours ago
What app router has become has its ideal uses, but if you explicitly preferred the DX of the pages router, you might enjoy TanStack Router/Start even more.
Comment by cjonas 7 hours ago
Comment by bryanrasmussen 8 hours ago
I don't care about having things simple to get started the first time, because soon I will have to start things a second or third time. If I have a little bit more complexity to get things started because routing is handled by code and not filesystem placement then I will pretty quickly develop templates to handle this, and in the end it will be easier to get things started the nth time than it is with the simple version.
Do I like the app router? No, Vercel does a crap job on at least two things - routing and building (server codes etc. can be considered as a subset of the routing problem), but saying I dislike app router is praising page router with too faint a damnation.
Comment by morsmodr 7 hours ago
Align early on wrt values of a framework and take a closer look at the funder's incentives.
Comment by berekuk 12 hours ago
It's the first stack that allows me to avoid REST or GraphQL endpoints by default, which was the main source of frontend overhead before RSC. Previously I had to make choices on how to organize API, which GraphQL client to choose (and none of them are perfect), how to optimize routes and waterfalls, etc. Now I just write exactly what I mean, with the very minimal set of external helper libs (nuqs and next-safe-action), and the framework matches my mental model of where I want to get very well.
Anti-React and anti-Next.js bias on HN is something that confuses me a lot; for many other topics here I feel pretty aligned with the crowd opinion on things, but not on this.
Comment by codemonkey-zeta 11 hours ago
Comment by berekuk 9 hours ago
You still need API routes for stuff like data-heavy async dropdowns, or anything else that's hard to express as a pure URL -> HTML, but it cuts down the number of routes you need by 90% or more.
Comment by skydhash 2 hours ago
Comment by c-hendricks 11 hours ago
Not to mention the whole middleware and being able to access the incoming request wherever you like.
Comment by kyleee 8 hours ago
Comment by reissbaker 9 hours ago
But I really, really do not like React Server Components as they work today. I think it's probably better to strip them out in favor of just a route.ts file in the directory, rather than the actions files with "use server" and all the associated complexity.
Technically, you can build apps like that using App Router by just not having "use server" anywhere! But it's an annoying, sometimes quite dangerous footgun to have all the associated baggage there waiting for an exploit... The underlying code is there even if you aren't using it.
I think my ideal setup would be:
1. route.ts for RESTful routes
2. actions/SOME_FORM_NAME.ts for built-in form parsing + handling. Those files can only expose a POST, and are basically a named route file that has form data parsing. There's no auto-RPC, it's just an HTTP handler that accepts form data at the named path.
3. no other built-in magic.
Comment by robertoandred 8 hours ago
Comment by reissbaker 7 hours ago
RSCs are React components that call server side code. https://react.dev/reference/rsc/server-components
Actions/"use server" functions are part of RSC: https://react.dev/reference/rsc/server-functions They're the RPC system used by client components to call server functions.
And they're what everyone here is talking about: the vulnerabilities were all in the action/use server codepaths. I suppose the clearest thing I could have said is that I like App Router + route files, but I dislike the magic RPC system: IMO React should simplify to JSON+HTTP and forms+HTTP, rather than a novel RPC system that doesn't interoperate with anything else and is much more difficult to secure.
Comment by spoiler 2 hours ago
An example of this is filesystem routing. Started off great, but now most Next projects look like the blast radius of a shell script gone terribly wrong.
There's also a(n in)famous GitHub response from one of the maintainers backwards-rationalising tech debt and accidental complexity as necessary. They're clearly smart, but the feeling I got from reading that comment was that they developed Stockholm syndrome towards their own codebase.
Comment by awestroke 7 hours ago
Comment by Seattle3503 7 hours ago
Comment by awestroke 2 hours ago
Comment by stack_framer 9 hours ago
Vercel has become a merchant of complexity, as DHH likes to say.
Comment by farley13 9 hours ago
Comment by robertoandred 8 hours ago
Comment by dawnerd 15 hours ago
Comment by Frotag 12 hours ago
Comment by sangeeth96 14 hours ago
I do respect the things React + Next team is trying to accomplish and it does feel like magic when it works but I find myself caring more and more about predictability when working with a team and with every major version of Next + React, that aspect seems to be drifting further and further away.
Comment by stack_framer 9 hours ago
Comment by thewtf 7 hours ago
Comment by bargainbin 2 hours ago
Comment by 0xblinq 8 hours ago
I can't recommend it enough. If you never tried/learnt about it, check it out. Unless you're building an offline first app, it's 100% the safest way to go in my opinion for 99.9% of projects.
Comment by tacker2000 3 hours ago
Instead of creating routes and using fetch() you just pass the data directly to the client side react jsx template, inertia automatically injects the needed data as json into the client page.
Comment by jaredklewis 9 hours ago
Have a Landing/marketing page? Then, yes, by all means render on the server (or better yet statically render to html files) so you squeeze every last millisecond you can out of that FCP. Also easy to see the appeal for ecommerce or social media sites like facebook, medium, and so on. Though these are also use cases that probably benefit the least from React to begin with.
But for the "app" part of most online platforms, it's like, who cares? The time to load the JS bundle is a one time cost. If loading your SaaS dashboard after first login takes 2 seconds versus 3 seconds, who cares? The amount of complexity added by SSR and RSC is immense, I think the payout would have to be much more than it is.
Comment by sakesun 6 hours ago
Comment by joshdavham 9 hours ago
Comment by rk06 9 hours ago
they may get other vulnemerelities as they are also in JS, but RSC class vulelnebereleties won't be there
Comment by rk06 1 hour ago
Comment by dirkc 4 hours ago
In retrospect I should have given it more thought since React Server Components are punted in many places!
Comment by lmm 10 hours ago
Comment by danabramov 1 hour ago
You have two poison pills (`import "server-only"` and `import "client-only"`) that cause a build error when transitively imported from the wrong environment. This lets you, for example, constrain that a database layer or an env file can never make it into the client bundle (or that some logic that requires client state can never be accidentally used from the stateless request/response cycle). You also have two directives that explicitly expose entry points between the two worlds.
The vulnerabilities in question aren't about wrong code/data getting pulled into a wrong environment. They're about weaknesses in the (de)serialization protocol which relied on dynamic nature of JavaScript (shared prototypes being writable, function having a string constructor, etc) to trick the server into executing code or looping. These are bad, yes, but they're not due to the client/server split being implicit. They're in the space of (de)serialization.
Comment by ashishb 14 hours ago
Comment by TZubiri 13 hours ago
So I ran a static analysis (grep) on the apk generated and
points light at face dramatically
the credentials were inside the frontend!
Comment by jaredwiener 12 hours ago
Most frameworks also by default block ALL environment variables on the client side unless the name is preceded by something specific, like NEXT_PUBLIC_*
Comment by mcpeepants 10 hours ago
I’ve been out of full stack dev for ~5 years now, and this statement is breaking my brain
Comment by TZubiri 8 hours ago
These kind of node + Mobile apps typically use an embedded browser like electron or a builtin browser, it's not much different than a web app.
Comment by tonyhart7 7 hours ago
React team reinvent the wheel again and again and now we back to laravel
Comment by WatchDog 11 hours ago
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.
Comment by mexicocitinluez 9 minutes ago
DISCLAIMER: After years of using Angular/Ember/Jquery/VanillaJs, jumping into React's functional components made me enjoy building front-ends again (and still remains that way to this very day). That being said:
This has been maybe the biggest issue in React land for the last 5 years at least. And not just for RSC, but across the board.
It took them forever to put out clear guidance on how to start a new React project. They STILL refuse to even acknowledge CRA exist(s/ed). The maintainers have actively fought with library makers on this exact point, over and over and over again.
The new useEffect docs are great, but years late. It'll take another 3-4 years before teh code LLMs spit out even resemble that guidance because of it.
And like sure, in 2020 maybe it didn't make sense to spell out the internals of RSC because it was still in active development. But it's 2025. And people are using it for real things. Either you want people to be successful or you want to put out shiny new toys. Maybe Guillermo needs to stop palling around with war criminals and actually build some shit.
It might be one of the most absurd things about React's team: their constitutional refusal to provide good docs until they're backed into a corner.
Comment by firtoz 6 hours ago
I had moved off nextjs for reasons like these, the mind load was getting too heavy for not too much benefit
Comment by chuckadams 16 hours ago
Comment by mubou2 13 hours ago
Every action, every button click, basically every input is sent to the server, and the changed dom is sent back to the client. And we're all just supposed to act like this isn't absolutely insane.
Comment by seer 10 hours ago
Basically you write only backend code, with all the tools available there, and a thin library makes sure to stich the user input to your backend functions and output to the front end code.
Honestly it is kinda nice.
Comment by Ndymium 52 minutes ago
LiveView does provide the tools to simulate latency and move some interactions to be purely client side, but it's the developers' responsibility to take advantage of those and we know how that usually goes...
Comment by mubou2 4 hours ago
Comment by dmix 9 hours ago
Websockets+thin JS are best for real time stuff more than standard CRUD forms. It will fill in for a ton of high-interactivity usecases where people often reach for React/Vue (then end up pushing absolutely everything needlessly into JS). While keeping most important logic on the server with far less duplication.
For simple forms personally I find the server-by-default solution of https://turbo.hotwired.dev/ to be far better where the server just sends HTML over the wire and a JS library morph-replaces a subset of the DOM, instead of doing full page reloads (ie, clicking edit to in-place change a small form, instead of redirecting to one big form).
Comment by brendanmc6 8 hours ago
It's extremely nice! Coming from the React and Next.js world there is very little that I miss. I prefer to obsess over tests, business logic, scale and maintainability, but the price I pay is that I am no longer able to obsess over frontend micro-interactions.
Not the right platform for every product obviously, but I am starting to believe it is a very good choice for most.
Comment by oefrha 8 hours ago
Comment by JeremyNT 9 hours ago
Server side rendering has been with us since the beginning, and it still works great.
Client side page manipulation has its place in the world, but there's nothing wrong with the server sending page fragments, especially when you can work with a nice tech stack on the backend to generate it.
Comment by qingcharles 6 hours ago
For instance, I've seen pages with a server-linked HTML button that would open a details panel. That button should open the panel without resorting to sending the event and waiting for a response from the server, unless there is a very, very specific reason for it.
Comment by CharlieDigital 11 hours ago
Main downside is the hot reload is not nearly as nice as TS.
But the coding experience with a C# BE/stack is really nice for admin/internal tools.
Comment by c0balt 12 hours ago
Comment by vbezhenar 11 hours ago
Comment by McGlockenshire 11 hours ago
This is insane to you only if you didn't experience the emergence of this technique 20-25 years ago. Almost all server-side templates were already partials of some sort in almost all the server-side environments, so why not just send the filled in partial?
Business logic belongs on the server, not the client. Never the client. The instant you start having to make the client smart enough to think about business logic, you are doomed.
Comment by pjmlp 15 hours ago
Then they rediscovered PHP, Rails, Java EE/Spring, ASP.NET, and reboted SPAs into fullstack frameworks.
Comment by sangeeth96 14 hours ago
I can understand the dislike for Next but this is such a poor comparison. If any of those frameworks at any point did half the things React + Next-like frameworks accomplished and the apps/experiences we got since then, we wouldn't be having this discussion.
Comment by acdha 13 hours ago
This is interesting because every Next/React project I see has a slower velocity than the median Rails/Django product 15 years ago. They’re just as busy, but pushing so much complexity around means any productivity savings is cancelled out by maintenance and how much harder state management and security are. Theoretically performance is the justification for this but the multi-second page load times are unconvincing.
From my perspective, it really supports the criticism about culture in our field: none of this is magic, we can measure things like page-weight, response times, or time to complete common tasks (either for developers or our users), but so much of it is driven by what’s in vogue now rather than data.
Comment by ricardobeat 11 hours ago
Comment by c-hendricks 10 hours ago
Comment by tacker2000 13 hours ago
If anything the latter is much easier to maintain and to develop for.
Comment by seer 10 hours ago
Now they accomplished this by imposing a lot of constraints on what you could do, but honestly it was solid UX at the time so it was fine.
Like the things you could do were just sane things to do in the first place, thus it felt quite ok as a dev.
React apps, _especially_ ones hosted on Next.js rarely feel as snappy, and that is with the benefit of 15 years of engineering and a few order of magnitude perf improvement to most of the tech pieces of the stack.
It’s just wild to me that we had faster web apps, with better organizarion, better dev ex, faster to build and easier to maintain.
The only “wins” I can see for a nextjs project is flexibility, animation (though this is also debatable), and maybe deployment cost, but again I’m comparing to deploying rails 15 years ago, things have improved there as well I’m sure.
I know react can accomplish _a ton_ more on the front end but few projects actually need that power.
Comment by pjmlp 6 hours ago
Comment by Atotalnoob 14 hours ago
Comment by brazukadev 14 hours ago
Comment by pjmlp 6 hours ago
Using anything else requires yak shaving instead of coding the application code.
That is the only reason I get to use them.
Comment by whizzter 14 hours ago
Comment by tshaddox 16 hours ago
Comment by reactordev 15 hours ago
Comment by tshaddox 15 hours ago
Comment by nawgz 13 hours ago
Surely there are not so many people building e-commerce sites that server components should have ever become so popular.
Comment by skydhash 12 hours ago
Comment by nawgz 8 hours ago
Comment by robertoandred 8 hours ago
Comment by hedayet 15 hours ago
Comment by rustystump 15 hours ago
Now they are shoving server rendering into react native…
Comment by moomoo11 14 hours ago
Like with almost everything people then shit on something they don’t understand.
Comment by tagraves 15 hours ago
Trying to justify the CVE before fully explaining the scope of the CVE, who is affected, or how to mitigate it -- yikes.
Comment by treesknees 15 hours ago
Comment by vcarl 15 hours ago
Comment by treesknees 14 hours ago
Comment by tom1337 14 hours ago
Comment by brazukadev 14 hours ago
Comment by rickhanlonii 15 hours ago
Comment by tagraves 14 hours ago
Comment by rickhanlonii 13 hours ago
Comment by haileys 15 hours ago
Comment by 0xblinq 8 hours ago
Comment by hitekker 14 hours ago
Comment by IceDane 6 hours ago
Comment by samdoesnothing 15 hours ago
Comment by everfrustrated 12 hours ago
Comment by zwnow 15 hours ago
Comment by brazukadev 14 hours ago
Comment by TZubiri 13 hours ago
Comment by rickhanlonii 13 hours ago
Comment by isodev 11 hours ago
If there are so many React developers out there using server side components while not familiar with the concept of CVEs, we’re in very serious trouble.
Comment by TZubiri 8 hours ago
Comment by hbbio 12 hours ago
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.
Comment by danabramov 4 hours ago
The vulnerabilities so far were weaknesses in the (de)serializer stemming from the dynamism of JavaScript — ability to hijack root object prototype, ability to toString functions to get their code, ability to override a Promise then implementation, ability to construct a function from a string. The patches are patching the (de)serializer to work around those dynamic pieces of JavaScript to avoid those gaps. This is similar to mistakes in parsers where they’re fooled by properties called hasOwnProperty/constructor/etc.
The serialization format is essentially “JSON with Promises and code chunk references”, and it seems like there’s enough pieces where dynamic nature of JS can leak that needed to be plugged. Hopefully with more scrutiny on the protocol, these will be well-understood by the team. The surface area there isn’t growing much anymore (it’s close to being feature-complete), and the (de)serializers themselves are roughly 5 kloc each.
The problem you had in Opa is solved in RSC with build-time assertions (import "server-only" is the server environment poison pill, and import "client-only" is the client environment poison pill). These poison pills work transitively up the module import stack and are statically enforced and prevent code (eg DB code, secrets, etc) from being pulled into the wrong environment. Of course this doesn’t prevent bugs in the (de)serializer but it’s why the overall approach is sound, in the absence of (de)serialization vulnerabilities.
Comment by Philpax 4 hours ago
Comment by hollowturtle 14 hours ago
Comment by TZubiri 13 hours ago
Comment by hollowturtle 13 hours ago
Comment by silverwind 12 hours ago
Comment by TZubiri 8 hours ago
Comment by danabramov 4 hours ago
The vulnerable packages are the ones starting with `react-server-` (like `react-server-dom-webpack') or anything that vendors their code (like `next` does).
Comment by ivanjermakov 14 hours ago
There we go.
Comment by hollowturtle 13 hours ago
Comment by dizlexic 9 hours ago
I'm a nobody PHP dev. He's a brilliant developer. I can't understand why he couldn't see this coming.
Comment by danabramov 6 hours ago
I agree I underestimated the likelihood of bugs like this in the protocol, though that’s different from most discussions I’ve had about RSC (where concerns were about user code). The protocol itself has a fairly limited surface area (the serializer and deserializer are a few kloc each), and that’s where all of the exploits so far have concentrated.
Vulnerabilities are frustrating, and this seems to be the first time the protocol is getting a very close look from the security community. I wish this was something the team had done proactively. We’ll probably hear more from the team after things stabilize a bit.
Comment by hu3 3 hours ago
Making complex things complex is easy.
Vue on the other hand is just brilliant. No wonder it's creator, Evan You went on to also create Vite. A creation so superior that it couldn't be confined to Vue and React community adopted it.
Comment by jdkoeck 4 hours ago
React lost me when it stopped being a rendering library and became a "runtime" instead. What do you know, when a runtime starts collapsing rendering, data fetching, caching, authorization boundaries, server and client into a single abstraction, the blast radius of any mistake becomes enormous.
Comment by locallost 5 hours ago
But sometimes, occasionally, a moonshot idea becomes a home run. That's why I dislike cynicism and grizzled veterans for whom nothing will ever work.
Comment by peacebeard 8 hours ago
Comment by kpozin 10 hours ago
(The same confusion comes up regularly whenever you touch Next.js apps.)
Comment by _heimdall 13 hours ago
Comment by sangeeth96 15 hours ago
Seems to affect 14.x, 15.x and 16.x.
Comment by nathants 6 hours ago
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.
Comment by delifue 11 hours ago
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).
Comment by bflesch 15 hours ago
Comment by venturecruelty 15 hours ago
Comment by LittleOtter 7 hours ago
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.
Comment by IceDane 6 hours ago
Comment by bitbasher 14 hours ago
Comment by yread 14 hours ago
Comment by manfre 12 hours ago
Comment by Inviz 14 hours ago
Comment by metta2uall 9 hours ago
Comment by ManuelKiessling 5 hours ago
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.
Comment by ydj 12 hours ago
Comment by greatgib 12 hours ago
Comment by rikafurude21 15 hours ago
Comment by billywhizz 15 hours ago
> These issues are present in the patches published last week.
> The patches published last week are vulnerable.
> If you already updated for the Critical Security Vulnerability, you will need to update again.
Comment by rickhanlonii 14 hours ago
Comment by theogravity 14 hours ago
Comment by qingcharles 6 hours ago
Comment by cluckindan 13 hours ago
Comment by kyleee 3 hours ago
Comment by ginkgotree 13 hours ago
Comment by hedayet 15 hours ago
Comment by jsheard 15 hours ago
Comment by acemarke 14 hours ago
I wrote an extensive post and did a conference talk earlier this year recapping the overall development history and intent of RSCs, as best as I understand it from a mostly-external perspective:
- https://blog.isquaredsoftware.com/2025/06/react-community-20...
- https://blog.isquaredsoftware.com/2025/06/presentations-reac...
Comment by brazukadev 14 hours ago
Comment by acemarke 11 hours ago
If you watch the various talks and articles done by the React team for the last 8 years, the general themes are around trying to improve page loading and data fetching experience.
Former React team member Dan Abramov did a whole series of posts earlier this year with differently-focused explanations of how to grok RSCs: "customizable Backend for Frontend", "avoiding unnecessary roundtrips", etc:
Conceptually, the one-liner Dan came up with that I liked is "extending React's component model to the server". It's still parent components passing props to child components, "just" spread across multiple computers.
Comment by brazukadev 3 hours ago
Comment by cluckindan 13 hours ago
Comment by brazukadev 3 hours ago
Comment by samdoesnothing 15 hours ago
Comment by tacker2000 13 hours ago
Apps that use React without server components are not affected.
Comment by delifue 11 hours ago
Comment by aatd86 15 hours ago
***
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. :)
Comment by brazukadev 14 hours ago
Comment by aatd86 13 hours ago
Comment by rvz 13 hours ago
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?
Comment by marksomnian 12 hours ago
> We are not using RSC at Meta yet, bc of limits of our packaging infra (it’s great at different things) and because Relay+GraphQL gives us many of the same benefits as RSCs. But we are fans and users of server driven UI and incrementally working toward RSC.
(as of April 2025)
Comment by TZubiri 8 hours ago
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.
Comment by jgalt212 11 hours ago
Comment by shadowgovt 15 hours ago
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.
Comment by ChrisArchitect 15 hours ago
React2Shell and related RSC vulnerabilities threat brief - Cloudflare
https://blog.cloudflare.com/react2shell-rsc-vulnerabilities-... (https://news.ycombinator.com/item?id=46237515)
Comment by aabhay 10 hours ago
Comment by carlcortright 15 hours ago
Comment by andrewmcwatters 11 hours ago
Comment by ashishb 14 hours ago
Comment by pier25 11 hours ago
Comment by ashishb 4 hours ago
Indeed, but unlike Go/Python (backend) and TS/JS (frontend), the separation is surmountable, and the push to "reuse" is high.
Comment by 0xblinq 8 hours ago
Comment by ashishb 4 hours ago
Programming languages do lead to certain software architectures. These are independent but not orthogonal issues.
Comment by leptons 13 hours ago
Comment by ashishb 13 hours ago
It happened with Next.js as well https://github.com/vercel/next.js/discussions/11106
> Say Python ran in the browser natively, and you reimplented React on browser and server in Python. Same problem, not Javascript.
Yes.
And since Python does not natively run in the browser, that mistake never happens. With JavaScript, the desire to have "backend and frontend in a single codebase" requires active resistance.
Comment by rounce 12 hours ago
It's the same vulnerabilities because Next uses the vulnerable parts of React.
Your rational is quite poor as I can write an isomorphic web app in C or Rust or Go and run parts in the browser, what then? Look, many of us also strongly dislike JavaScript but generally that distaste is based on its actual shortcomings and failures, you don't have to invent new ones plenty already exist.
Comment by ashishb 11 hours ago
If you have a single codebase for Go-based code running in an untrusted browser (the "toilet") and a trusted backend (the "kitchen"), then the same contamination is highly likely.
Comment by leptons 8 hours ago
Did you even bother to read my comment? Try again, please. Next time don't skip over parts.
Comment by phplovesong 6 hours ago
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.
Comment by tills13 11 hours ago
Comment by ipnon 11 hours ago
I’m not interested in flame wars per se, but I can tell you there are better alternatives, and that the closer you stay towards targeting the browser itself the better, because browser APIs are at least an order of magnitude more secure and performant than equivalent JS operations.
Comment by rickhanlonii 15 hours ago
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.
Comment by PKop 14 hours ago