Next.js Affected by Cache Key Confusion for Image Optimization API Routes
CVE-2025-57752Published 29 Aug 2025, 22:06 UTC
Real-world risk
3.4/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.2
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
Next.js is a React framework for building full-stack web applications. In versions before 14.2.31 and from 15.0.0 to before 15.4.5, Next.js Image Optimization API routes are affected by cache key confusion. When images returned from API routes vary based on request headers (such as Cookie or Authorization), these responses could be incorrectly cached and served to unauthorized users due to a cache key confusion bug. This vulnerability has been fixed in Next.js versions 14.2.31 and 15.4.5. All users are encouraged to upgrade if they use API routes to serve images that depend on request headers and have image optimization enabled.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| Next.jsUbiquitous | >= 15.0.0, < 15.4.5; < 14.2.31 | 15.4.5, 14.2.31 |
What to do
Update to a fixed version: 15.4.5, 14.2.31.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | LocalMust already run code or have a shell on the machine | From the CVSS vector | 0.50 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.4% chance of exploitation in 30 days (percentile 37), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.500
- Threat T1: Nothing known0.850
- 10 × impact 0.8 × prerequisites 0.5 × threat 0.853.400
- Rounded to one decimal between 0.1 and 103.4
Exploitation and evidence timeline
- 29 Aug 2025 Published
- 3 Dec 2026 Risk 3.4 (cvss fallback)
Weakness
CWE-524