CVE-2025-57752

Medium

Description

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.

SeverityMedium
CVSS6.2
Exploit probability—
ProductVercel Next.js
PublishedAug 29, 2025
First seenAug 29, 2025
Weakness typeCWE-524CWE-524

How to fix

Update
  • vercel next.js14.2.31, 15.4.5 or later
  • next14.2.31, 15.4.5 or later

Affected products

ProductAffected versionsFixed in
vercel next.jsv < 14.2.31, 15.0.0 ≤ v < 15.4.514.2.31, 15.4.5
nextnpm0.9.9 ≤ v < 14.2.31, 15.0.0 ≤ v < 15.4.514.2.31, 15.4.5

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.