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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| vercel | next.js | >= 15.0.0, < 15.4.5, < 14.2.31 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | jitsucom-jitsu +2 | 2.11.0-r1 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | next | >= 0.9.9, < 14.2.31 | 14.2.31 | GHSA-g5qg-72qw-gw5v |
| npm | next | >= 15.0.0, < 15.4.5 | 15.4.5 | GHSA-g5qg-72qw-gw5v |
Advisories 1
- WID-SEC-2025-1934 Vercel Next.js: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 16, 2025