CVE-2025-57752Next.js Affected by Cache Key Confusion for Image Optimization API Routes
A medium-severity vulnerability reachable with local access, needing no privileges and no user interaction. EPSS estimates a 0.3% chance of exploitation in the next 30 days. A fixed version is named.
- Exploited in the wild
- Not in KEV
- EPSS
- 0.3%
- percentile 16%
- Fix
- Named by a source
- CVE published 29 Aug 2025
Reference
None of the "Needs attention" rules apply right now.
EPSS 0.3% (+0) · No privileges required (+5) · No user interaction (+5)
Immediate actions
- next (npm): upgrade to 14.2.31 / 15.4.5 or later on your release line.
- Patch: https://github.com/vercel/next.js/commit/6b12c60c61ee80cb0443ccd20de82ca9b4422ddd
- Patch: https://github.com/vercel/next.js/pull/82114
- Advisory: https://github.com/vercel/next.js/security/advisories/GHSA-g5qg-72qw-gw5v
- Advisory: https://vercel.com/changelog/cve-2025-57752
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2025-57752
Who should check
next (npm) pkg:npm/next
- Affected>= 0.9.9, < 14.2.31Fixed in14.2.31OSV (GHSA-g5qg-72qw-gw5v)
- Affected>= 15.0.0, < 15.4.5Fixed in15.4.5OSV (GHSA-g5qg-72qw-gw5v)
vercel next.js product:vercel/nextjs
- Affected>= 15.0.0, < 15.4.5Affected range ends before15.4.5as published by CNA (CVE List)
- Affected< 14.2.31Affected range ends before14.2.31as published by CNA (CVE List)
- Affected< 14.2.31Affected range ends before14.2.31as published by CPE data (via the NVD API)
- Affected>= 15.0.0, < 15.4.5Affected range ends before15.4.5as published by CPE data (via the NVD API)
Products (not packages) are shown as their sources publish them. We check no product version against these ranges; a fixed version is the one the source names. Ask the vendor's advisory.
Confirmed facts
- CVSS
- 6.2 MEDIUM (version 3.1)
- Score from
- CNA ([email protected])
- Attack vector
- local
- Attack complexity
- low
- Privileges required
- none
- User interaction
- none
- Weakness
- CWE-524
- Exploitation (CISA SSVC)
- none
- Automatable (CISA SSVC)
- no
- Assigned by
- [email protected]
Unknowns
- We show one CVSS score. Other sources may score this CVE differently.
Advisory text
Quoted from the source advisory (untrusted)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.
Update history
- 29 Aug 2025Published
References
- patchhttps://github.com/vercel/next.js/commit/6b12c60c61ee80cb0443ccd20de82ca9b4422ddd
- patchhttps://github.com/vercel/next.js/pull/82114
- advisoryhttps://github.com/vercel/next.js/security/advisories/GHSA-g5qg-72qw-gw5v
- advisoryhttps://vercel.com/changelog/cve-2025-57752
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-57752
- otherhttps://github.com/vercel/next.js
Sources
- EPSS by FIRST.org, Free to use, attribution requested. Scores generated by Empirical Security.
- CVE-2025-57752 (CVE List (CNA and CISA ADP data, through the NVD API)), CVE terms of use. Copyright The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation.
- NVD API 2.0 (NIST), the API we query, NVD API terms of use. This product uses the NVD API but is not endorsed or certified by the NVD.
- GHSA-g5qg-72qw-gw5v (GitHub Advisory Database), CC BY 4.0.
- OSV.dev, Per database.
This page is our own presentation: records are shortened, normalised and merged. Licences
Last checked: kev 7 min ago · osv 7 min ago · nvd 68 min ago · epss 7 min ago · JSON · ask via MCP: explain_vulnerability
Also known as GHSA-g5qg-72qw-gw5v