Next.js CVE-2026-44572
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSend HTTP request with x-nextjs-data header
-
DeliveryNext.js middleware mishandles as internal data request
-
ExploitServer returns x-nextjs-redirect instead of Location header
-
InstallCDN caches broken 3xx response
-
C2Subsequent users receive cached response without Location header
-
ExecuteBrowser cannot follow redirect
-
ImpactDenial of service for affected path
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V4 - API and Web Service Acceptance of extraneous untrusted data
|
| Exploitation Conditions | Three specific conditions must be met: (1) The application uses Next.js middleware or proxy features that return 3xx redirect responses. (2) The application is deployed behind a CDN or reverse proxy that caches HTTP responses. (3) That caching layer does not vary its cache key on the x-nextjs-data header, meaning it treats requests with and without this header identically for caching purposes. If any of these three conditions is absent, the vulnerability cannot be exploited. The attack requires no authentication, no special user interaction, and no special privileges; it is a simple HTTP request from any external client. The x-nextjs-data header is present in a normal HTTP request; the attacker does not need to bypass network firewalls or access controls to send it. However, the high CVSS complexity (AC:H) reflects that the precise combination of middleware redirects, caching, and cache-key configuration must align, making opportunistic mass exploitation unlikely. |
| Impact | CVSS 3.7 (low severity by score) reflects AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L - network-accessible, high complexity, no privileges or user interaction, availability impact only. However, real-world risk hinges on three specific conditions: (1) the application uses middleware or proxy redirects, (2) it is deployed behind a caching CDN or reverse proxy, and (3) that proxy caches 3xx responses without differentiating on x-nextjs-data. The high complexity (AC:H) reflects that all three conditions must align for exploitation; neither widespread nor trivial. No EPSS score, CVSS vector analysis, or KEV status provided in input, but the attack is straightforward once conditions are met - a single HTTP request with a spoofed header. Impact is denial of service affecting a specific redirect path, not data breach or code execution. For organizations with default CDN configurations that do not vary cache on custom headers, risk is elevated; for those with existing cache-key variance or no caching of 3xx responses, risk is low. Patch availability (15.5.16, 16.2.5) reduces risk significantly for those able to upgrade promptly. |
| Exploit ScenarioDerived | An attacker identifies a Next.js application deployed behind Cloudflare or similar CDN with middleware that redirects /old-path to /new-path. The attacker sends an HTTP GET request to /old-path with the header x-nextjs-data: 1. The Next.js server, trusting the header, returns a 302 response with x-nextjs-redirect: /new-path instead of the standard Location: /new-path header. The CDN caches this broken response (cache key does not vary on x-nextjs-data by default). For the next 24 hours (or until cache expiration), all users requesting /old-path receive the cached broken redirect without a Location header, causing their browsers to display an error or blank page, resulting in denial of service for that redirect path. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 11, 2026
Cache poisoning in Next.js middleware redirect handling allows attackers to inject a malicious x-nextjs-data request header, causing middleware to replace the standard Location header with an internal x-nextjs-redirect header that browsers ignore. When deployed behind a CDN or reverse proxy that caches 3xx responses without varying on this header, a single attacker request can poison the cached redirect, resulting in denial of service for that redirect path for all subsequent visitors until cache expiration. Affects Next.js versions 12.2.0-15.5.15 and 16.0.0-16.2.4; vendor-released patches available in 15.5.16 and 16.2.5.
RemediationAI
Upgrade Next.js to version 15.5.16 (for the 15.x branch) or 16.2.5 (for the 16.x branch) or later. These versions validate x-nextjs-data against internal routing state, eliminating the header injection vector. Before upgrading, configure your CDN or reverse proxy to vary the cache key on the x-nextjs-data header for all 3xx responses, preventing cache poisoning even if external clients send the header. This workaround has minimal performance impact (adds one header to the cache key) and does not alter application behavior. Alternatively, disable caching of 3xx responses on the affected middleware redirect paths if feasible, though this may increase origin load. Monitor CDN cache-hit ratios after applying the cache-key variance to ensure the workaround does not degrade performance unacceptably; for most deployments, the overhead is negligible.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Next.js uses the x-nextjs-data request header internally to signal data requests from the client-side router, allowing the server to return optimized responses without full page HTML. The vulnerability stems from CWE-349 (Acceptance of Extraneous Untrusted Data Element) - the middleware logic trusted the x-nextjs-data header itself without validating it against internal routing state. When an external attacker spoofs this header on a normal request to a path handled by middleware that returns a 3xx redirect, the server incorrectly treats it as an internal data request and substitutes the standard HTTP Location header with the proprietary x-nextjs-redirect header. Since browsers do not follow x-nextjs-redirect, the response becomes unusable. If a CDN or reverse proxy caches 3xx responses with a cache key that does not vary on x-nextjs-data (a common default behavior), a single attacker request populates the cache with a broken redirect, poisoning it for all downstream users. The fix validates x-nextjs-data only when corroborated by internal routing state, preventing external header injection from altering redirect behavior.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
Impact
Next.js uses the x-nextjs-data request header for internal data requests. On affected versions, an external client could send this header on a normal request to a path handled by middleware that returns a redirect.
When that happened, the middleware/proxy could treat the request as a data request and replace the standard Location redirect header with the internal x-nextjs-redirect header. Browsers do not follow x-nextjs-redirect, so the response became an unusable redirect for normal clients.
If the application was deployed behind a CDN or reverse proxy that caches 3xx responses without varying on this header, a single attacker request could poison the cached redirect response for the affected path. Subsequent visitors could then receive a cached redirect response without a Location header, causing a denial of service for that redirect path until the cache entry expired or was purged.
Affected scenarios
This affects applications that:
- use middleware or proxy redirects
- are deployed behind a caching CDN or reverse proxy
- allow 3xx responses on those paths to be cached without differentiating internal data requests from normal requests
Fix
The fix stops trusting x-nextjs-data by itself for middleware redirect handling. A request is now treated as an internal data request only when it is validated as such by internal routing state, preserving legitimate data-request redirect behavior while preventing external header injection from changing normal redirect responses.
Workarounds
Before upgrading, users can reduce risk by:
- configuring the CDN or reverse proxy to vary its cache key on
x-nextjs-datafor affected responses
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
GHSA-3g8h-86w9-wvmq
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB