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

- Severity: Medium 6.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Published: 2025-08-29T22:06:22.000Z
- Modified: 2026-10-18T21:10:00.120Z
- Also known as: GHSA-g5qg-72qw-gw5v
- Weaknesses: CWE-524
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- vercel next.js: >= 15.0.0, < 15.4.5; < 14.2.31; before 14.2.31; from 15.0.0 before 15.4.5
- next (npm): from 0.9.9 before 14.2.31; from 15.0.0 before 15.4.5

## Every score

- GitHub_M: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.2 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/vercel/next.js/security/advisories/GHSA-g5qg-72qw-gw5v> (vendor-advisory, web)
- <https://github.com/vercel/next.js/pull/82114> (patch, web)
- <https://github.com/vercel/next.js/commit/6b12c60c61ee80cb0443ccd20de82ca9b4422ddd> (patch, 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)

## Sources

- CVE List: [CVE-2025-57752](https://www.cve.org/CVERecord?id=CVE-2025-57752), CVE Terms of Use, modified 2025-09-02
- GitHub Advisory Database: [GHSA-g5qg-72qw-gw5v](https://github.com/advisories/GHSA-g5qg-72qw-gw5v), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-57752](https://nvd.nist.gov/vuln/detail/CVE-2025-57752), Public domain, modified 2026-10-18

---

Page: https://cve.day/CVE-2025-57752 · Whole record: https://cve.day/CVE-2025-57752.json · Rebuilt by cve.day 2026-11-25T22:59:03.908Z
