Next.js Cache Poisoning: Fix 7 CVEs in the Nov 2026 Patch
Next.js cache poisoning and cookie-leak CVEs hit multi-tenant apps using use cache in Next.js 16. Patch to 16.4.5 or 15.5.29 today - here's exactly how.
By Babul Jack
Next.js's November 2026 security release fixes seven CVEs, and the worst one lets a cold cache fill leak one tenant's data to another tenant through the directive. If you run a multi-tenant Next.js 16 app with Cache Components enabled, this is not a routine patch-and-forget update - it's the kind of bug that leaks customer data without ever showing up in an error log.
Vercel published seven security advisories against Next.js, fixed in v16.4.5 (Active LTS) and v15.5.29 (Maintenance LTS). One is rated High, six are Medium. None allows remote code execution on its own, which is why several teams are tempted to deprioritize this release - a mistake if you're running Cache Components in production.
npm install next@16.4.5 # apps on 16.x
npm install next@15.5.29 # apps on 15.5
In client projects I've seen teams treat "no RCE" as "low priority" and skip a patch window. With this release, that reasoning doesn't hold - three of the seven issues let one user's cached response reach a different user.
Why the cross-tenant cache disclosure is the one to fix first
The highest-severity advisory, GHSA-mfr8-8qww-v76h, affects apps that call the same public use cache function both directly and from inside unstable_cache, where that function reads a root parameter such as a tenant ID.
During a cold cache fill, a concurrent request can receive another request's result before its root parameters are checked. That result then gets stored and served to later callers with matching arguments - until the entry is revalidated or evicted. In a multi-tenant SaaS app, that's one customer's dashboard data rendering inside another customer's session.
Two related advisories compound the risk:
Nested use cache functions (GHSA-vc7v-qv4w-wrv8): an inner cached function that returns an early value alongside a slower async value can let the outer cache entry commit before the inner function's root-parameter dependency is recorded. Content built for one tenant, site, or locale gets reused for another.
Binary use cache arguments (GHSA-rhh4-g77r-r9qj): passing a Uint8Array or Blob to a use cache function can produce identical cache keys for different binary values. If those arguments identify a user or account, one caller's result can be served to another, or poisoned outright.
None of these three apply if your app never enables cacheComponents in next.config and never uses use cache. That's an important filter before you panic.
The session cookie that JavaScript can read
The fourth notable fix, GHSA-f3mh-rxg3-f5g2, is unrelated to caching. App Router Edge Route Handlers and Pages Router Edge API routes that set cookies with NextResponse.cookies.set() can expose the serialized cookie in an internal x-middleware-set-cookie response header.
Unlike Set-Cookie, that header is readable by same-origin JavaScript - so a cookie marked HttpOnly, including a session token, loses its protection the moment an unrelated XSS bug runs on the same origin. Node.js Route Handlers and routes that use cookies().set() instead of NextResponse were not affected. It's been present since Next.js 15.0.0.
The remaining three advisories are narrower: a shared-shell cache poisoning issue in self-hosted apps running next start with Cache Components on and Partial Prefetching off, a response-framing issue specific to self-hosted apps behind certain pipelining HTTP/1.1 reverse proxies, and an SVG-rejection bypass in Image Optimization that can slip past images.dangerouslyAllowSVG: false.
How to check if your Next.js app is exposed
Run these five checks from your project root before deciding how urgently to patch.
Confirm your installed version.
npm ls next
Check whether Cache Components is enabled - if this returns nothing, the four caching advisories don't apply to you.
grep -rn "cacheComponents" next.config.*
Search for use cache usage across your app directory.
grep -rln "use cache" app src 2>/dev/null
Find Edge runtime routes - if nothing matches, the cookie-header issue doesn't apply.
Review your image optimizer config for remote sources.
grep -n -A6 "images" next.config.*
If every one of those checks comes back empty, none of the seven issues reaches you directly. Patch anyway - these monthly releases are cumulative, and staying current keeps the next critical fix a one-line bump instead of a multi-version jump.
Is this Next.js vulnerability actually exploitable?
The cache-disclosure issues need Cache Components enabled, a specific function-call pattern (a cached function invoked both directly and through unstable_cache), and concurrent requests during a cold cache fill - it's not a trivial one-request exploit, but it also doesn't require authentication or a malicious payload, since the application generates the leaked content itself. The cookie-exposure issue needs an attacker who already runs JavaScript on your origin, so it turns an existing XSS bug into session theft rather than creating a standalone exploit path. No public exploitation has been reported for any of the seven as of this writing.
How do I upgrade Next.js without breaking production?
Within a release line these are patch versions, so the change is small, but a build and redeploy is non-negotiable:
npm install next@16.4.5
npm ls next
npm run build
Self-hosted deployments using standalone output or Docker images bake in the version they were built with - bumping package.json alone changes nothing in production until you rebuild and redeploy the image. After deploying, verify the live version through a health endpoint or your build logs rather than trusting the repository. After upgrading, purge any persistent cache: a poisoned or cross-keyed entry written before the patch can otherwise stay live until it's naturally revalidated or evicted.
Line
Status
Fixed version
Security fixes until
Next.js 16
Active LTS
16.4.5
Until the next major version
Next.js 15
Maintenance LTS
15.5.29
January 31, 2027
Next.js 14 and older
Unsupported
No fix available
Already ended
If you're still on Next.js 15, take 15.5.29 now and plan the move to 16 before support ends. The upgrade guide for version 16 lists the breaking changes - async params access, Turbopack as the default bundler, and the removal of experimental PPR flags in favor of stable cacheComponents - and the jump deserves a proper test pass, not a Friday afternoon deploy. For teams weighing a full framework upgrade alongside this patch, that's exactly the kind of migration work I cover in Babul Jack's Next.js 16 Cache Components migration guide.
Building a monthly patch habit instead of a scramble
Next.js has shipped security fixes on a monthly schedule since mid-2026, usually pre-announced about a week ahead, with out-of-band releases when an upstream dependency forces one. Treating the first week of each month as patch week - read the pre-announcement, run the exposure checks above, and have a CI pipeline ready to build and deploy - turns what could be a scramble into roughly an hour of work.
This is also where a lot of teams quietly fall behind: the patch itself is trivial, but nobody owns the process of checking exposure, rebuilding self-hosted images, and purging caches afterward. If you'd rather not track the Next.js release calendar yourself, that ongoing patch-and-deploy discipline is part of what I handle under web app development for clients running Next.js in production.
A related discipline worth building alongside this: if you're also chasing Interaction to Next Paint failures or still mid-migration on TypeScript 7, bundle those upgrade windows with your monthly security patch cycle rather than treating each as a separate fire drill.
Frequently asked questions
Does this affect every Next.js app, or just ones using specific features?
No. Four of the seven advisories only apply if your app has Cache Components enabled (cacheComponents in next.config) and uses the use cache directive. The cookie-header issue only applies to Edge runtime routes using NextResponse.cookies.set(). A single-tenant app on the Node.js runtime with no remote image sources is unlikely to be affected by most of these, but upgrading is still free insurance.
What's the difference between Next.js 16.4.5 and 15.5.29 for this patch?
Both releases fix the cookie-exposure issue (CVE-2026-119346) and the SVG-rejection bypass, since those bugs date back to Next.js 15.0.0. The four Cache Components advisories only affect Next.js 16.x (Cache Components was introduced there), so 15.5.29 users don't need to worry about those specific four, but should still upgrade for the cookie and image fixes.
Do I need to purge my cache after upgrading?
Yes, if you had Cache Components enabled before patching. A cache entry poisoned or cross-keyed before the fix can keep serving the wrong content until it naturally revalidates or gets evicted. Purging the persistent cache after deploying the patched version closes that gap immediately instead of waiting it out.
Is self-hosting Next.js riskier than deploying on Vercel for these issues?
For two of the seven advisories, yes - the shared-shell cache poisoning and the response-framing issue are specific to self-hosted deployments running next start behind particular reverse-proxy configurations. The other five apply regardless of hosting provider, since they're about cache key generation and cookie headers rather than infrastructure.
Key takeaways
Next.js's November 3, 2026 security release fixes seven CVEs in v16.4.5 and v15.5.29 - one High severity, six Medium, none independently exploitable for remote code execution.
The highest-risk issues require Cache Components (cacheComponents + use cache) to be enabled; multi-tenant apps using that pattern should treat this as urgent.
A separate cookie-exposure bug lets same-origin JavaScript read HttpOnly cookies set via NextResponse on Edge routes, turning an existing XSS bug into session theft.
Run the five grep-based exposure checks before deciding urgency, but patch regardless - these releases are cumulative and monthly.
After upgrading, rebuild and redeploy self-hosted images, then purge the persistent cache so pre-patch poisoned entries don't linger.
Next.js 15 gets security fixes until January 31, 2027; anything on 14 or older has no patch path and needs a migration plan now.