CVE-2025-32421: Next.js Race Condition to Cache Poisoning
Summary We received a responsible disclosure from Allam Rachid (zhero) for a low-severity race-condition vulnerability in Next.js. This issue only affects the Pages Router under certain misconfigurations, causing normal endpoints to serve pageProps data instead of standard HTML.
Learn more here
Credit Thank you to Allam Rachid (zhero) for the responsible disclosure. This research was rewarded as part of our bug bounty program.
Other sources
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.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-32421?
CVE-2025-32421 is classified as a moderate severity race-condition vulnerability affecting specific misconfigurations of the Next.js Pages Router.
How do I fix CVE-2025-32421?
To fix CVE-2025-32421, update Next.js to version 14.2.24 or later, or to version 15.1.6 or later.
Who is affected by CVE-2025-32421?
Versions of Next.js prior to 14.2.24 and 15.1.6 are affected by CVE-2025-32421 if misconfigured with the Pages Router.
What types of applications are impacted by CVE-2025-32421?
CVE-2025-32421 impacts full-stack web applications built using Next.js that utilize the Pages Router and may be misconfigured.
How can I determine if my application is vulnerable to CVE-2025-32421?
Check the version of Next.js you are using, and assess if the Pages Router is misconfigured, as this will indicate vulnerability to CVE-2025-32421.