Next.js Cache Poisoning Vulnerability Leading to Denial-of-Service

Vulnerability

A cache poisoning vulnerability has been identified in Next.js, a React framework for full-stack web applications. This issue affects versions 15.0.4-canary.51 prior to 15.1.8. The vulnerability can lead to a denial-of-service condition by allowing a HTTP 204 response to be cached for static pages. As a result, the 204 response could be served to all users accessing the page. This issue does not impact customers hosted on Vercel.

Impact

Exploitation of this vulnerability could cause a denial-of-service condition by serving cached HTTP 204 responses to users accessing affected static pages.

Reproduction

To reproduce this vulnerability, deploy a Next.js application using a version between 15.0.4-canary.51 and prior to 15.1.8. Ensure that the application has a route using cache revalidation with Incremental Static Regeneration (ISR) and a route using Server-Side Rendering (SSR), with a Content Delivery Network (CDN) configured to cache 204 responses. Under these conditions, the vulnerability can be reproduced by accessing the affected static page, which will serve the cached 204 response to the user.

Remediation

Users can upgrade to Next.js version 15.1.8 or later to address this vulnerability.

Added: Jul 3, 2025, 9:41 PM
Updated: Jul 3, 2025, 10:27 PM

Vulnerability Rating

Custom Algorithm
spread
5.2
impact
2.5
exploitability
7.4
remediation
7.7
relevance
0.2
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.