Vulnerability
CVE-2026-27980
Next.js is a React framework for building full-stack web applications. Starting in version 10.0.0 and prior to version 16.1.7, the default Next.js image optimization disk cache (`/_next/image`) did not have a configurable upper bound, allowing unbounded cache growth. An attacker could generate many unique image-optimization variants and exhaust disk space, causing denial of service. This is fixed in version 16.1.7 by adding an LRU-backed disk cache with `images.maximumDiskCacheSize`, including eviction of least-recently-used entries when the limit is exceeded. Setting `maximumDiskCacheSize: 0` disables disk caching. If upgrading is not immediately possible, periodically clean `.next/cache/images` and/or reduce variant cardinality (e.g., tighten values for `images.localPatterns`, `images.remotePatterns`, and `images.qualities`).
19 advisories report this vulnerability, across 3 ecosystems.
Advisories
- CGA-2jc4-v45j-fh34
- CGA-2qf4-rqfc-f9fp
- CGA-53cx-79f9-phpp
- CGA-59w8-mcp2-73f8
- CGA-5gh4-6c42-p97g
- CGA-5xm7-f326-hr4w
- CGA-8rm3-6c9p-fp3q
- CGA-9rmh-735v-c4xw
- CGA-c597-pc63-5vxv
- CGA-c83c-5j77-p45m
- CGA-h3c4-jh5r-gff2
- CGA-m5mq-j6c3-gppf
- CGA-qh8r-qw9w-r357
- CGA-qm53-34wh-mrg9
- CGA-qq59-hx2r-78gw
- CGA-x64r-cvjr-cv95
- CGA-x9xx-337m-h5w4
- CGA-xh8v-fp9f-gqc8
-
GHSA-3x4c-7xq6-9pq8
Next.js: Unbounded next/image disk cache growth can exhaust storage