Blog / Security Advisories

Next.js November 2026 Security Release: Cross-Tenant Cache Leaks, Cookie Exposure, and How to Upgrade

On November 3, 2026, Vercel released Next.js 16.4.5 and 15.5.29 with fixes for seven vulnerabilities. Most of them are in the new Cache Components system and can serve one tenant’s or one user’s data to another. Here is what each flaw does, which apps are affected, how to upgrade, and why you should purge caches after you do.

· 10 min read

The Next.js November 2026 security release fixes one High and six Medium severity issues. Upgrade to [email protected] (Active LTS) or [email protected] (Maintenance LTS). Four issues only affect 16.x apps with Cache Components enabled, and are the most serious for multi-tenant SaaS: under the right conditions, a cached result computed for one tenant or user is returned to another. The other three affect self-hosted response handling, Edge route cookies, and image optimization on both lines.

This article was created with AI assistance. Facts were checked against the official Next.js November 2026 security release post, the linked GitHub advisories, and Netlify’s platform notice on November 7, 2026. Confirm details in the official advisories before acting.

TL;DR: what to install

If you runUpgrade toNotes
Next.js 16.x16.4.5Fixes all seven issues
Next.js 15.5.x15.5.29Fixes the three issues that affect 15.x
Next.js 15.4 or olderMove to 15.5.29 or 16.4.5No fixed release for older lines
Netlifynext 16.4.5 or 15.5.29, plus @netlify/plugin-nextjs 5.16.6The plugin update is needed for the Middleware cookie fix
npm install [email protected]    # 16.x
npm install [email protected]   # 15.5.x
npm ls next                # confirm every workspace resolved the new version

Patch releases are cumulative. If you skipped earlier 2026 releases, these versions also include earlier fixes such as the two CVSS 9.5 remote code execution flaws (GHSA-673q-mjm6-r5xr and CVE-2026-96889) first fixed in 16.4.1 and 15.5.28.

The seven vulnerabilities

CVEIssueSeverityAffected
CVE-2026-119790Cross-tenant cache disclosure when a use cache function is called both directly and through unstable_cacheHigh16.3+ with Cache Components
CVE-2026-119351Cross-root-parameter disclosure in nested use cache functionsMedium16.2+ with Cache Components
CVE-2026-119349Cross-user cache disclosure and poisoning through binary use cache argumentsMedium16.x with Cache Components
CVE-2026-119350Shared fallback shell cache poisoning in self-hosted next startMedium16.4+ with Cache Components
CVE-2026-119348Cross-client response injection through stale compressed response framingMediumSelf-hosted 15.5+ and 16.x
CVE-2026-119346HttpOnly cookie values exposed in the internal x-middleware-set-cookie header on Edge routesMedium15.5+ and 16.x Edge routes
CVE-2026-119347SVG rejection bypass in Image Optimization through AVIF misclassificationMedium15.x and 16.x

Cache Components: when one tenant sees another’s data

Cache Components (the use cache directive) cache the result of a server function and reuse it for later calls with the same inputs. In multi-tenant apps, a root parameter such as [tenant] or [locale] is often what separates one customer’s data from another’s. Three of the bugs break that separation:

  • CVE-2026-119790 (High). If the same public use cache function reads a root parameter and is called both directly and from inside unstable_cache, a concurrent call during a cold cache fill can receive another request’s result without its root parameters being checked. That result is then stored and served to later callers until it is revalidated or evicted.
  • CVE-2026-119351. With nested use cache functions, if the inner one reads a root parameter and returns an early value plus a slower async value, the outer entry can be saved before the inner function’s root-parameter dependency is recorded. Content for one tenant, site, or locale can then be served for another.
  • CVE-2026-119349. Different binary arguments, such as Uint8Array or ArrayBuffer values, can produce the same cache identity. If those arguments identify users or accounts, one caller can get another’s cached result, or plant their own result for someone else.

The fourth, CVE-2026-119350, affects self-hosted next start apps with Cache Components enabled and Partial Prefetching unset or disabled. A crafted URL for a specific route shape (a prerenderable dynamic parameter followed by at least two never-prerendered parameters and a blocking fallback shell) can store request-specific values in a shared page shell. Other visitors then see wrong content or a persistent 404.

These are not attacker-controlled injections in the usual sense. The app itself generates the leaked content; the cache hands it to the wrong person. That makes them hard to spot in logs and easy to miss in single-user testing.

Response injection, cookie exposure, and SVG bypass

  • CVE-2026-119348: response injection (self-hosted). If a route returns an upstream fetch() Response unchanged, Next.js can forward decompressed body bytes with the original compressed response’s length and encoding headers. Behind an HTTP/1.1 reverse proxy that queues pipelined requests on a shared backend connection, that mismatch can attach responses to the wrong clients. An attacker who can line up requests on the connection can inject a response for another user or read theirs. It requires that specific proxy behavior.
  • CVE-2026-119346: HttpOnly cookie exposure on Edge routes. App Router Edge Route Handlers and Pages Router Edge API routes that set cookies with NextResponse.cookies.set() also leaked the serialized cookie in the internal x-middleware-set-cookie header. Same-origin JavaScript can read that header, so an HttpOnly session cookie becomes readable by any XSS on your site. Node.js runtime routes and cookies().set() were not affected in Vercel’s tests.
  • CVE-2026-119347: SVG filter bypass. An image from an allowed remote source could be labelled as AVIF and get past images.dangerouslyAllowSVG: false, then be decoded as SVG by a native image backend. Vercel says this widens exposure to SVG parser bugs and resource exhaustion; it did not demonstrate XSS or code execution by itself. Your remotePatterns allowlist still applies.

Check whether you are affected

# Which Next.js version does each app resolve?
npm ls next

# Are Cache Components and use cache in play?
grep -rnE "cacheComponents|'use cache'|\"use cache\"" next.config.* app src 2>/dev/null
grep -rn "unstable_cache" app src 2>/dev/null

# Edge routes that set cookies
grep -rln "runtime = 'edge'" app pages src 2>/dev/null \
  | xargs grep -ln "cookies.set"

# Live check: an internal header should never reach the browser
curl -s -D - -o /dev/null https://your-app.example.com/api/login | grep -i '^x-middleware-'

Hosting matters. Netlify reports its platform is not affected by CVE-2026-119790, CVE-2026-119348, or CVE-2026-119347 because of how it runs functions and images, but Netlify-hosted apps are affected by the other cache issues and need the upgrade. Self-hosted next start behind your own proxy is exposed to the widest set.

After you upgrade: purge caches

The patch stops new bad entries; it does not remove ones already stored. If you use Cache Components or a shared cache handler:

  1. Clear your cache handler (for example a Redis or filesystem cache shared across instances) and redeploy with a fresh build cache.
  2. Purge your CDN for pages rendered by affected routes, so poisoned shells and cross-tenant pages are not served from the edge.
  3. Revalidate tags and paths used by tenant-scoped data with revalidateTag or revalidatePath if you cannot purge everything.
  4. Review exposure. If you ran an affected configuration, consider whether tenant data could have been served to the wrong customer and what your notification obligations are.

Hardening that outlasts this release

  • Pass tenant and user identity as explicit, string arguments to cached functions, rather than relying on implicit root-parameter tracking or binary values. Make the cache key visibly include everything that separates customers.
  • Do not mix unstable_cache and use cache for the same function. Pick one caching model per data path.
  • Never return an upstream Response as-is. Read the body and build a new Response with the headers you intend to send. This also stops upstream headers like Set-Cookie leaking through a proxy route.
  • Keep per-user responses out of shared caches. Send Cache-Control: private, no-store on authenticated API responses and make sure your CDN respects it.
  • Turn off HTTP/1.1 pipelining to backends in your reverse proxy, or use HTTP/2 or a connection per request.
  • Reduce XSS impact. A strict Content Security Policy makes header and cookie leaks like CVE-2026-119346 much harder to use.

For a deeper look at testing tenant boundaries, see our guide to tenant isolation testing for SaaS APIs.

How DAST tools help you catch issues like this sooner

Dependency scanning tells you that you run a vulnerable next version. It cannot tell you whether your deployed app actually serves one tenant’s data to another, because that depends on your routes, cache handler, CDN, and proxy working together. Dynamic application security testing checks the running system the way a customer, or an attacker, would see it.

DastPilot scans your APIs from an OpenAPI spec or Postman collection, as every user and role you configure. The checks most relevant to this release:

  • Cross-user and cross-tenant access (BOLA): requests each user’s resources as another user and flags responses that contain data the caller should not see. A cache that hands tenant A’s result to tenant B shows up the same way.
  • Sensitive data exposure: flags tokens, secrets, and PII returned in responses beyond what your spec declares.
  • Security headers and misconfiguration: reports missing security headers and verbose errors on every endpoint.
  • Privilege escalation (BFLA): replays admin and owner operations as lower-privileged roles.
  • Regression tracking: compares each scan with the last, so an isolation failure introduced by a framework or caching change is flagged as new or reopened.

Race-dependent cache bugs like CVE-2026-119790 will not reproduce on every scan, which is why the fix is the upgrade. What scanning does is catch the far more common, deterministic version of the same failure, a missing tenant check or a per-user response in a shared cache, and keep checking after every deploy in your CI/CD pipeline.

Frequently asked questions

Which Next.js versions fix the November 2026 vulnerabilities?

Next.js 16.4.5 fixes all seven vulnerabilities, and Next.js 15.5.29 fixes the three that affect the 15.x line. Both were released on November 3, 2026. Apps on older lines should move to one of these versions.

What is CVE-2026-119790?

CVE-2026-119790 is a High-severity Next.js vulnerability in Cache Components. When the same public use cache function reads a root parameter, such as a tenant ID, and is called both directly and through unstable_cache, a concurrent call during a cold cache fill can receive and store another request’s result, disclosing one tenant’s data to another. It affects 16.3 and later and is fixed in 16.4.5.

What is the x-middleware-set-cookie vulnerability in Next.js?

CVE-2026-119346: Edge Route Handlers and Edge API routes that set cookies with NextResponse.cookies.set() also exposed the cookie in the internal x-middleware-set-cookie response header, which same-origin JavaScript can read, defeating HttpOnly. It is fixed in 15.5.29 and 16.4.5; on Netlify, @netlify/plugin-nextjs 5.16.6 is also required.

Do I need to clear caches after upgrading Next.js?

Yes, if you use Cache Components, a shared cache handler, or a CDN. The patch prevents new bad entries but does not remove entries that were already stored, so clear the cache handler, purge the CDN for affected routes, and revalidate tenant-scoped tags and paths.

Is my Next.js app affected if I do not use Cache Components?

Four of the seven issues require Cache Components on Next.js 16. The other three, response injection in self-hosted apps, cookie exposure on Edge routes, and the SVG image optimization bypass, affect both 15.x and 16.x regardless, so you should still upgrade.

Can a DAST scanner find cross-tenant data leaks in Next.js apps?

DAST tools such as DastPilot test the deployed app as multiple users and flag responses that return another user’s or tenant’s data, which catches missing tenant checks and per-user responses stored in shared caches. Timing-dependent cache races may not reproduce on every scan, so upgrading remains the fix for these CVEs.

Prove tenants cannot see each other’s data

DastPilot tests every endpoint as each user and role you configure, flags cross-tenant access and sensitive data in responses, and rechecks after every deploy. 30-day free trial, no credit card required.