Skip to main content
← All vulnerabilities
CVE-2025-57752GHSA-G5QG-72QW-GW5V

Next.js Affected by Cache Key Confusion for Image Optimization API Routes

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 15.4.5, 14.2.31
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • vercel next.js

    From 15.0.0 · fixed in 15.4.5; fixed in 14.2.31

  • nextnpm

    From 0.9.9 · fixed in 14.2.31

  • nextnpm

    From 15.0.0 · fixed in 15.4.5

References 4

GitHub · vercel/next.js

vercel.com