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 Vercels 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.
The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Next.js | Vercel | * | 14.2.24 (excluding) |
Next.js | Vercel | 15.0.0 (including) | 15.1.6 (excluding) |
A race condition occurs within concurrent environments, and it is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc. A race condition violates these properties, which are closely related:
A race condition exists when an “interfering code sequence” can still access the shared resource, violating exclusivity. The interfering code sequence could be “trusted” or “untrusted.” A trusted interfering code sequence occurs within the product; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable product.