CVE-2025-57752
nextjs: Next.js Affected by Cache Key Confusion for Image Optimization API Routes
Overview
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.
Source: OX vulnerability database
Severity
6.2 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness: CWE-524
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| npm | next | >=0.9.9, <14.2.31>=15.0.0, <15.4.5 | 14.2.3115.4.5 |
Open a package to see all its vulnerabilities.
Operating systems · 6 fixes
Red Hat 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | firefox | affected |
| 8 | firefox +1 | affected |
| 9 | aspnetcore-runtime-7-0 +14 | affected |
chainguard 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| jitsucom-jitsu | 2.11.0-r1 |
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| trigger-dev | 4.5.0-r0 |
wolfi 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| jitsucom-jitsu | 2.11.0-r1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-57752
- github.com https://github.com/vercel/next.js
- github.com https://github.com/vercel/next.js/commit/6b12c60c61ee80cb0443ccd20de82ca9b4422ddd
- github.com https://github.com/vercel/next.js/pull/82114
- github.com https://github.com/vercel/next.js/security/advisories/GHSA-g5qg-72qw-gw5v
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-57752
- vercel.com https://vercel.com/changelog/cve-2025-57752
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-57752
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.