Skip to content

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

MediumCVSS 6.2 EPSS 0.31%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial

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.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
npm next(npm) >= 0.9.9, < 14.2.31; >= 15.0.0, < 15.4.5; >= 15.0.0, <= 15.4.4 14.2.31, 15.4.5 Fixed
vercel next.js < 14.2.31; = < 14.2.31; = >= 15.0.0, < 15.4.5; >= 15.0.0, < 15.4.5 14.2.31, 15.4.5 Fixed

Affected products

ProductAffected versionsFixed in
npm next(npm) >= 15.0.0, <= 15.4.4 No fix listed
npm next(npm) >= 0.9.9, < 14.2.31 14.2.31
vercel next.js = >= 15.0.0, < 15.4.5 No fix listed
vercel next.js = < 14.2.31 No fix listed
vercel next.js < 14.2.31 14.2.31
vercel next.js >= 15.0.0, < 15.4.5 15.4.5
npm next(npm) >= 15.0.0, < 15.4.5 15.4.5

References