r/reactjs • u/Zogid • Jul 27 '26
Discussion Why are there so much security vulnerabilities with server actions/functions, app router and React server components???
/r/nextjs/comments/1v81b3q/why_are_there_so_much_security_vulnerabilities/
0
Upvotes
4
u/vasind-5012 Jul 27 '26
Two things stacking, real framework CVEs (RSC’s newer, less battle-tested than plain REST), plus a dev-pattern issue, Server Actions feel like calling a function so people skip checks they’d never skip on an actual API route.
Biggest one: auth checked in the page, not in the action itself, and the action’s reachable on its own regardless.
Patch often, and treat every Server Action like a public API, because it is one.
14
u/ConsoleTVs Jul 27 '26
RSC is what happens when frontend devs accidentally reinvent PHP and ASP.NET WebForms, but with 10x the build complexity.
The entire pitch is 'What if we rendered UI on the server?' welcome to 1998. We’ve known how to do this for thirty years.
The tragic part is watching the frontend world stumble into every classic backend pitfall because they didn't look at prior art:
'use server'is just RPC/PHP forms in disguise, obfuscating clean API boundaries right back into your UI components.__VIEWSTATE,shipping bloated, custom payload blobs to pretend HTTP isn't stateless.It’s classic wheel-reinvention: engineers whose mental model started with client-side SPAs discovering server-side architecture for the first time and acting like they invented fire.
Don't get me wrong, I respect the technical ambition behind it, but I really wish we'd learn from the past instead of wrapping 20-year-old architectural anti-patterns in shiny new JS primitives.
1
u/yabai90 Aug 01 '26
As far as I know RCS is a powerful but terrible API. Making the boundary too easy to cross and too easy to forget. There is a balance between convenience and absurdity