CVE-2025-32421 Next.js Race Condition to Cache Poisoning

Low 3.7 Published Updated

Attackers can poison caches to serve incorrect data due to a race condition in Next.js Pages Router under specific misconfigurations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-32421?

CVE-2025-32421 is a low-severity vulnerability in Vercel Next.js, published on 14 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-362

Which versions are affected by CVE-2025-32421?

4 open source packages ship an affected version, including next. It affects 1 product.

PackageAffectedFixed in
next npmFrom 0.9.914.2.24
next npmFrom 0.9.914.2.24
next npmFrom 15.0.015.1.6
next npmFrom 15.0.015.1.6

Products include Vercel Next.js.

How do I fix CVE-2025-32421?

Upgrade next to a fixed version for your release line: 14.2.24 or 15.1.6.

Is CVE-2025-32421 being exploited?

There is no known exploitation of CVE-2025-32421 in the wild and no public exploit code.

Public exploit code: 2 proofs of concept on GitHub.

All Vercel Next.js vulnerabilities

Sources

Also known as GHSA-qpjv-v59x-3qc4, MINI-6fmh-4jmf-4pvj, ROOT-APP-NPM-CVE-2025-32421.

Is CVE-2025-32421 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free