CVE-2025-57752
MEDIUM 6.2CVSS 3.1Next.js Affected by Cache Key Confusion for Image Optimization API Routes
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.
- Published
- 29 Aug 2025
- Last modified
- 18 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-524
- Also known as
- GHSA-g5qg-72qw-gw5v
- Sources
- NVDJSONOSV GHSA-g5qg-72qw-gw5vJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vercel | next.jscpe:2.3:a:vercel:next.js:*:*:*:*:*:node.js:*:* |
< 14.2.31 | 14.2.31 |
| NVD | vercel | next.jscpe:2.3:a:vercel:next.js:*:*:*:*:*:node.js:*:* |
>= 15.0.0, < 15.4.5 | 15.4.5 |
| OSV | npm | next | >= 0.9.9, < 14.2.31 | 14.2.31 |
| OSV | npm | next | >= 15.0.0, < 15.4.5 | 15.4.5 |
References
- https://github.com/vercel/next.js/commit/6b12c60c61ee80cb0443ccd20de82ca9b4422ddd · Patch, WEB
- https://github.com/vercel/next.js/pull/82114 · Patch, WEB
- https://github.com/vercel/next.js/security/advisories/GHSA-g5qg-72qw-gw5v · Vendor Advisory, WEB
- https://vercel.com/changelog/cve-2025-57752 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-57752 · ADVISORY
- https://github.com/vercel/next.js · PACKAGE
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 29 Aug 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 29 Aug 2025)