next
Affected
- introduced
16.0.0-beta.0, fixed16.1.7(semver)
Fixed versions
16.1.7
Fix
- Fixed version
16.1.7npm install [email protected]
Advisory
Also known as: CVE-2026-27980
Next.js: Unbounded next/image disk cache growth can exhaust storage
Summary
The default Next.js image optimization disk cache (/_next/image) did not have a configurable upper bound, allowing unbounded cache growth.
Impact
An attacker could generate many unique image-optimization variants and exhaust disk space, causing denial of service. Note that this does not impact platforms that have their own image optimization capabilities, such as Vercel.
Patches
Fixed 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.
Workarounds
If upgrade is not immediately possible:
.next/cache/images.images.localPatterns, images.remotePatterns, and images.qualities)Medium Basis: The source's own band: MODERATE
16.0.0-beta.0, fixed 16.1.7 (semver)16.1.7
16.1.7npm install [email protected]10.0.0, fixed 15.5.14 (semver)15.5.14
15.5.14npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0