Next.js < 14.2.24 - Race Condition in Pages Router via x-now-route-matches Header
Title source: llmExploitation Summary
EIP tracks 3 public exploits for CVE-2025-32421. PoCs published by Delfaster, hidesec, zeroc00I.
AI-analyzed exploit summary This PoC demonstrates a race condition vulnerability in Next.js (CVE-2025-32421) leading to cache poisoning. It simulates concurrent requests to exploit improper caching of sensitive data responses.
Description
Next.js is a React framework for building full-stack web applications. Versions prior to 14.2.24 and 15.1.6 have a race-condition vulnerability. This issue only affects the Pages Router under certain misconfigurations, causing normal endpoints to serve `pageProps` data instead of standard HTML. This issue was patched in versions 15.1.6 and 14.2.24 by stripping the `x-now-route-matches` header from incoming requests. Applications hosted on Vercel's platform are not affected by this issue, as the platform does not cache responses based solely on `200 OK` status without explicit `cache-control` headers. Those who self-host Next.js deployments and are unable to upgrade immediately can mitigate this vulnerability by stripping the `x-now-route-matches` header from all incoming requests at the content development network and setting `cache-control: no-store` for all responses under risk. The maintainers of Next.js strongly recommend only caching responses with explicit cache-control headers.
Exploits (3)
This PoC demonstrates a race condition vulnerability in Next.js (CVE-2025-32421) leading to cache poisoning. It simulates concurrent requests to exploit improper caching of sensitive data responses.
This repository provides a detailed technical analysis of CVE-2025-32421, focusing on its combination with XSS vulnerabilities in Next.js 15.0.4. It includes implementation details, attack scenarios, and mitigation strategies.
The repository contains deceptive code that simulates a buffer overflow but includes hidden telemetry sending user arguments to an external endpoint. The code does not demonstrate a real exploit for CVE-2025-32421 but instead attempts to exfiltrate data.
References (2)
Scores
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N