CVE-2026-44572

Cache Poisoning
Affects
Next.js
in
Next.js
No items found.
Versions
>=12.2.0 <15.5.16, >=16.0.0 <16.2.5

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Next.js is a popular open-source React framework developed by Vercel that enables server-side rendering, static site generation, and full-stack web application development.

A low-severity Cache Poisoning vulnerability (CVE-2026-44572) has been identified in Next.js. The edge-middleware adapter derives its "this is a client-side data fetch" signal from the inbound x-nextjs-data request header without first stripping externally-supplied copies. An attacker can send x-nextjs-data: 1 on a normal page request and, if middleware returns a redirect, the adapter swaps the Location header for the internal x-nextjs-redirect header. Browsers cannot follow x-nextjs-redirect, so the response is a broken redirect, and behind a CDN that does not vary on x-nextjs-data the broken response can be served to subsequent legitimate visitors.

Per OWASP: The impact of a maliciously constructed response can be magnified if it is cached either by a web cache used by multiple users or even the browser cache of a single user. If a response is cached in a shared web cache, such as those commonly found in proxy servers, then all users of that cache will continue to receive the malicious content until the cache entry is purged.

‍

Details

Module Info

‍

Vulnerability Info

This low-severity vulnerability is found in Next.js versions >=12.2.0 and <15.5.16, as well as versions >=16.0.0 and <16.2.5. 

The edge-middleware adapter at packages/next/server/web/adapter.ts reads request.headers['x-nextjs-data'] to decide whether to convert a middleware-issued redirect into the internal x-nextjs-redirect form. Because the inbound header is trusted verbatim, any client can supply it on a non-data URL and observe the redirect-conversion behavior on responses that should have included a normal Location header.

This vulnerability could be exploited by:

  • sending a request with x-nextjs-data: 1 to a page URL that middleware redirects (for example a route gated by an authentication or A/B-test redirect)
  • relying on a shared cache (CDN, reverse proxy) that does not include x-nextjs-data in its cache key, so the broken-redirect response is served back to subsequent legitimate visitors

This does not impact applications hosted on providers that handle middleware at the platform level, such as Vercel.

‍

Mitigation

Next.js versions prior to 15.5.x are End-of-Life and will not receive any updates to address this issue. For more information see here.

Users of the affected components should apply one of the following mitigations:

  • Upgrade affected applications to a fixed version of Next.js.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Low
ID
CVE-2026-44572
PROJECT Affected
Next.js
Versions Affected
>=12.2.0 <15.5.16, >=16.0.0 <16.2.5
NES Versions Affected
Published date
May 18, 2026
≈ Fix date
May 12, 2026
Category
Cache Poisoning
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Next.js
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.