Nextjs Fundamentals · Server & Client Components

The RSC attack surface

RSC security (CVE-2025-66478)

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).

  1. The server/client boundary is a trust boundary: data and code crossing it must be treated as untrusted.
  2. Server Functions are private and can only be called from the app's own UI.
  3. Because a Server Function is a public HTTP endpoint, every one must perform ___ checks.
  4. Arguments sent to a Server Function from the client can be trusted without validation.
  5. A ___ centralizes server-only data access and authorization so it cannot be bypassed.
  6. The RSC deserialization path handles data from untrusted clients, so keeping the framework patched matters.