Skip to main content
← All vulnerabilities
CVE-2026-27980GHSA-3X4C-7XQ6-9PQ8

Next.js: Unbounded next/image disk cache growth can exhaust storage

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

Summary

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`).

Timeline

  1. CVE published
  2. CISA SSVC assessment

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

  3. Record last updated

Affected versions

  • vercel next.js

    From 10.0.0 · fixed in 16.1.7

  • nextnpm

    From 16.0.0-beta.0 · fixed in 16.1.7

  • nextnpm

    From 10.0.0 · fixed in 15.5.14

References 3

GitHub · vercel/next.js