Skip to content

Next.js

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?

ProductAffected versions (from the sources)Fixed in
Next.jsUbiquitous>= 15.0.0, < 15.4.5; < 14.2.3115.4.5, 14.2.31

What to do

Update to a fixed version: 15.4.5, 14.2.31.

Why this score

FactorValueEvidence×
ImpactMajor data exposureReads secrets, credentials, databases, arbitrary filesFrom the CVSS vector0.80
Attacker positionLocalMust already run code or have a shell on the machineFrom the CVSS vector0.50
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.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
  1. Prerequisites multiplied together0.500
  2. Threat T1: Nothing known0.850
  3. 10 × impact 0.8 × prerequisites 0.5 × threat 0.853.400
  4. Rounded to one decimal between 0.1 and 103.4

How the score works

Exploitation and evidence timeline

  1. 29 Aug 2025 Published
  2. 3 Dec 2026 Risk 3.4 (cvss fallback)

Weakness

CWE-524

References

Get alerts for Next.js

Free email or text alerts when a vulnerability in Next.js reaches risk 8 or higher. Nothing else.

CVE-2025-57752: Next.js Affected by Cache Key Confusion for Image Optimization API Routes · CVE Feed