On a Next.js v16.2.4 deployment with App Router caching, GET /dashboard?attack=1 with header RSC: text/x-component returns a 200 response whose body is a binary React Flight payload and whose Content-Type is text/html. A CDN keyed on URL caches the response under that content-type. Subsequent visitors to the same URL receive the Flight framing rendered as HTML. Any literal <script> tag inside the cached server-component output executes in the victim origin. The advisory calls this "cache poisoning when shared caches do not correctly partition response variants." The patch calls it "add explicit checks for RSC header."
CVE-2026-44576: Next.js Had Five Inline RSC Header Checks. Two Accepted Any Truthy Value.
vendor
pattern
cve
proof of concept
Five call sites, three definitions
The new file in the patch is packages/next/src/server/lib/is-rsc-request.ts. Its entire body is nine lines, docblock included:
/**
* Normalizes the raw RSC header value. Only the literal string "1" is treated
* as a valid RSC request marker; malformed or repeated values are ignored.
*/
export function isRSCRequestHeader(
value: string | string[] | null | undefined
): boolean {
return value === '1'
}The file did not exist before commit 0dd94836a8. The predicate it expresses had been inlined at five call sites in the Next.js codebase, with three distinct strictness levels:
// packages/next/src/server/base-server.ts
} else if (req.headers[RSC_HEADER] === '1') {
addRequestMeta(req, 'isRSCRequest', true)
}
// packages/next/src/server/lib/router-utils/resolve-routes.ts
if (
req.headers[RSC_HEADER] === '1' &&
(!parsedDestination.origin || isAllowedOrigin)
) { /* set rewrite headers */ }
// packages/next/src/server/web/adapter.ts (edge runtime)
const isRSCRequest = requestHeaders.get(RSC_HEADER) === '1'
// packages/next/src/build/templates/app-page.ts
const isRSCRequest =
getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER])
// packages/next/src/server/app-render/app-render.tsx
const isRSCRequest = headers[RSC_HEADER] !== undefinedThree said === '1'. One said Boolean(...), which accepts any truthy header value, including 'text/x-component', '0', ' ', and the literal string 'foo'. One said !== undefined, which accepts the empty string and any present value at all. The two loose checks were the ones at the rendering and routing decision sites. The three strict checks were at the early request-classification sites.
The strict check existed. It only spoke on yes.
The strict check in base-server.ts runs first in the request lifecycle. It writes a metadata flag when, and only when, the header equals '1':
} else if (req.headers[RSC_HEADER] === '1') {
addRequestMeta(req, 'isRSCRequest', true)
}There is no else branch. When the header is 'text/x-component', the check does not match, no metadata is written, and the request reaches the later decision sites with getRequestMeta(req, 'isRSCRequest') returning undefined. The later site in app-page.ts is structured as a fallback:
const isRSCRequest =
getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER])The nullish coalescing operator interprets the strict check's silence as undecided. The right-hand side evaluates. Boolean('text/x-component') is true. The renderer enters the RSC code path.
The five sites looked independent. They were chained. The early site set the flag; the later sites either inherited it or rolled their own. Where the later site rolled its own and was looser, the early site's strictness was invisible to it. The strictest check in the codebase provided no defensive value against the loosest check, because the loose check ran later and answered the question for itself when the strict check stayed silent.
And the URL the adapter received had ?nxtPtenant=tenant-x on it
Header confusion is half of the patch. The other half is a different commit, af0e96ba23, fixing a different file. After the request enters the RSC code path, the response is generated and handed to the deployment adapter via the onCacheEntry callback. The commit message names the deployment adapter's contract plainly:
In a deployed environment,
onCacheEntryV2determines whether a postponed response is HTML-origin or RSC-origin by checking whethermeta.urlends with.rsc.
onCacheEntryV2 is Vercel-side code that runs outside the Next.js process. The contract between Next.js and the adapter is unwritten: Next.js will pass you a URL whose suffix tells you which content-type to set. Pre-patch, the URL Next.js passed was:
const finished = await onCacheEntry(cacheEntry, {
url: getRequestMeta(req, 'initURL') ?? req.url,
})initURL is the full URL recorded when the request entered, query string included. For a dynamic root-param RSC request, that URL was /[tenant]/samples.rsc?nxtPtenant=tenant-x. The string contains .rsc. It does not end with .rsc. It ends with =tenant-x. The adapter's endsWith('.rsc') evaluated false. The adapter set the content-type to text/html. The binary Flight payload was written to the wire under that content-type, and a CDN keying on the URL plus pathname cached it.
The post-patch line strips the query before passing:
const rawCacheEntryUrl = getRequestMeta(req, 'initURL') ?? req.url
const cacheEntryUrl = rawCacheEntryUrl
? (parseUrl(rawCacheEntryUrl)?.pathname ?? rawCacheEntryUrl)
: undefined
const finished = await onCacheEntry(cacheEntry, { url: cacheEntryUrl })The ?nxtPtenant=... segment is the routing convention Next.js uses to thread root-param tenants. It is a query string the framework's own client appends. The framework's own URL convention defeated the framework's own content-type decision. The fix moves the canonicalization to the boundary; the adapter sees a pathname now, and endsWith('.rsc') works the way the contract assumed it always did.
The chain that gets weaponized
Bug 1 alone breaks legitimate RSC traffic on dynamic routes with query strings. The mis-classification happens regardless of who is asking. Bug 2 alone lets an attacker enter the RSC code path on any URL with any non-empty header that is not the literal string '1'. The combination is the cross-user attack.
# Attacker, on a Next.js <= 16.2.4 deployment with App Router caching:
curl -i \
-H 'RSC: text/x-component' \
-H 'Next-Router-Prefetch: 1' \
'https://target.example/dashboard?attack=1'
# HTTP/1.1 200 OK
# Content-Type: text/html; charset=utf-8
# Cache-Control: s-maxage=300, stale-while-revalidate
#
# 0:["$","html",null,{"children":[...]}]
# 1:I["app/dashboard/page",[...],"default"]The header value 'text/x-component' is truthy. app-page.ts's Boolean(...) accepts it. The renderer enters the RSC code path. The URL passed to the adapter is /dashboard?attack=1. The adapter's endsWith('.rsc') evaluates false, the URL has no .rsc suffix in this scenario at all. The adapter sets content-type to text/html. The CDN caches the response under the URL key, with content-type text/html, marked cacheable by the s-maxage directive the framework sets on cached App Router pages.
# Any subsequent visitor, no special headers:
curl -i 'https://target.example/dashboard?attack=1'
# HTTP/1.1 200 OK
# Content-Type: text/html; charset=utf-8
# Age: 42
#
# 0:["$","html",null,{"children":[...]}]The body is React Flight framing. The browser parses it as HTML. The Flight stream encodes server-component output and the metadata the framework injects. Any literal <script> tag inside that output, common when components render Open Graph tags, structured data, third-party widget snippets, or attribute values containing quoted JavaScript, executes in the victim origin. The cache entry persists for the duration of the TTL, which on App Router routes is whatever the developer set with cacheLife or what the framework defaults to.
The pattern is the bug
The header has three interpretations across five sites. The cache-key URL has two interpretations: Next.js passes a full URL, the adapter expects a pathname. In both cases the fix is the same shape. Pick one canonical interpretation. Write it once. Route every call site through it.
This is the parallel-implementation-gap pattern. CVE-2026-44576 is the fifth instance from the same Next.js v16.2.4 to v16.2.5 release window:
- CVE-2026-44578: the self-hosted router-server's upgrade handler lacked an absolute-URL guard that the Vercel edge runtime had.
- CVE-2026-44575: the App Router renderer stripped
.rscsuffixes the middleware matcher's compiled regex never learned. - CVE-2026-44573:
resolveRoutesprefixed page requests with the default locale and did not prefix data requests. - CVE-2026-44577: the
maximumResponseBodycap was wired to one branch of a ternary and not the other.
CVE-2026-44576 is the highest-multiplicity instance of the five. Where 44577 had two parallel sites, 44576 has five. Where 44575 had a single alphabet drift in one regex compiler, 44576 has three coexisting strictness levels for one HTTP header. The release ships twelve CVEs. Five of them are this shape.
The patch is a refactor
PR #91541, merged March 18, 2026 by Zack Tanner, wired the URL canonicalization. PR #98, cherry-picked from PR #83 into the release branch on May 1, 2026, introduced isRSCRequestHeader and replaced the five inline checks. Both commits are refactors. Neither adds a new security mechanism. Each finds the predicate that should have been one definition and was N definitions, picks the strictest, writes it down once, and threads every call site through it.
A refactor that fixes a CVE is testimony that the bug was structural. Five inline checks accumulated over years of incremental development. Each was written at the moment a developer needed to ask whether a request was RSC. The first ones written, in base-server.ts and resolve-routes.ts, were strict. The later ones drifted because the developers writing them did not look at the existing checks before rolling their own. RSC_HEADER was a shared constant. The strictness of what counts as a match for that constant was not.
The patch creates the place where it would have been.
PoC: dwisiswant0/next-16.2.4-pocs Patch commits: vercel/next.js@af0e96ba, vercel/next.js@0dd94836 Advisory: GHSA-wfc6-r584-vfw7
The patch is not a new check. The patch is the existing check, finally written once.