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

Published May 14, 2025
·
Updated

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

5 affected componentsFixes available
Vercel Next.js<14.2.24, <15.1.6
npm/next>=15.0.0<15.1.6
15.1.6
npm/next<14.2.24
14.2.24
Vercel Next.js Node.js<14.2.24
Vercel Next.js Node.js>=15.0.0<15.1.6

Event History

May 14, 2025
CVE Published
via MITRE·10:56 PM
Data Sourced
via MITRE·10:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:15 PM
Affected Software
May 15, 2025
Advisory Published
via GitHub·02:12 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203