The RSC attack surface
The server/client boundary is not just an architecture line — it is a trust boundary. Everything the client can send across it is attacker-controlled, and everything on the server side must be treated as sensitive.
Server Functions are the clearest example. A function marked 'use server' is a
public HTTP endpoint. The framework wires up a POST route for it, so anyone
who knows the endpoint id can call it — not only your UI. The UI hiding a button
is not authorization:
'use server';
export async function deletePost(id: string) {
// Anyone can call this with any id.
await db.posts.delete({ where: { id } });
}
Every Server Function must therefore authenticate the caller and authorize the action, and it must validate its arguments, because they arrive from an untrusted client. A common defense is a Data Access Layer that centralizes these checks so they cannot be forgotten.
The same boundary is where the RSC Payload is deserialized on the server. That deserialization path parses data from untrusted clients, which makes it an attack surface in its own right — a reason to stay on a patched release.
You are about to answer a short quiz on RSC security (CVE-2025-66478).