megachangelog
Security15.1.6, 14.2.24

CVE-2025-32421: Cache Poisoning Vulnerability in Next.js

A low severity cache poisoning vulnerability was discovered in Next.js versions >14.2.24 through <15.1.6 that exploits a race condition between requests to inject non-cacheable responses into the CDN cache. The issue was patched in versions 15.1.6 and 14.2.24 by stripping the x-now-route-matches header from incoming requests, and Vercel's platform is not affected as it requires explicit cache-control headers.

A low severity cache poisoning vulnerability was discovered in Next.js.

This affects versions as a bypass of the previous . The issue happens when an attacker exploits a race condition between two requests — one containing the query parameter and another with the header.>14.2.24?__nextDataRequest=1x-now-route-matches through <15.1.6CVE-2024-46982

Some CDN providers may cache a response even in the absence of explicit headers, enabling a poisoned response to persist and be served to subsequent users.200 OKcache-control

This vulnerability allows an attacker to poison the CDN cache by injecting the response body from a non-cacheable data request () into a normal request that retains cacheable headers, such as .?__nextDataRequest=1Cache-Control: public, max-age=300

No backend access or privileged escalation is possible through this vulnerability.

This issue was verified using automated tooling that repeatedly triggers the race condition. Successful exploitation depends on precise timing and the presence of a vulnerable CDN configuration. A Python-based proof of concept script was shared by the reporter and used to validate this behavior on live targets prior to the patch.

This issue was patched in and by stripping the header from incoming requests.15.1.614.2.24x-now-route-matches

Applications hosted on by this issue, as the platform does not cache responses based solely on status without explicit headers.Vercel's platform are not affected200 OKcache-control

For self-hosted Next.js deployments unable to upgrade immediately, you can mitigate this vulnerability by:

We strongly recommend only caching responses with explicit headers.cache-control

Thank you to Allam Rachid (zhero;) for the responsible disclosure. They were awarded as part of our bug bounty program.

Read more

Summary

Impact

Patches

Credit

Affected Versions

Vercel Platform Mitigation

Workarounds

  • Next.js versions >14.2.24 through <15.1.6

  • Stripping the header from all incoming requests at your CDNx-now-route-matches

  • Setting for all responses under riskcache-control: no-store

securitycachingcdnnextjsrace-condition

Source: original entry ↗

More from Vercel

Follow Vercel to get its new changes in your feed and email digest.

Announcement2026.10.19

Updates to Hobby and Pro Terms of Service

Vercel is updating Terms of Service for Hobby and Pro customers effective October 19, 2026, clarifying credit policies, managed accounts, auto-renewal practices, and adding statutory cancellation and refund rights for UK and EU consumers, including protections for service changes with negative impact.

termsbillingcreditspolicylegal
Announcement

Mercury 3 now available on AI Gateway

Inception's Mercury 3 model is now available on Vercel's AI Gateway with 50% launch pricing and generation speeds exceeding 1,000 tokens per second. The model enables parallel text refinement with a 1M-token context window, ideal for real-time applications like browser agents and customer support.

ai-gatewaymodelsinferencellmlaunch
Announcement

MiniMax M3.1 Flash now available on AI Gateway for free

MiniMax M3.1 Flash, an open-weight multimodal model with 1M-token context window for coding and agentic work, is now available on Vercel's AI Gateway at no cost through October 20. The model excels at complex agent tasks, coding applications, and cybersecurity work, and can be used through multiple APIs and coding agents.

ai-gatewaymodelscodingagentsapi
See all Vercel changes →