GitHub Advisoryadvisory · npm
GHSA-q8wf-6r8g-63ch Next.js: Denial of Service in the Image Optimization API using SVGs
MEDIUM
Official page ↗
- Aliases
- CVE-2026-64644
- Ecosystem
- npm
- Packages
- next
- Severity
- Moderate
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- Weaknesses
- CWE-407
- Reviewed
- 2026-07-22
Affected packages
• npm next: >= 15.5.0, < 15.5.21 → fixed in 15.5.21
• npm next: >= 16.0.0, < 16.2.11 → fixed in 16.2.11
Description
Impact
When self-hosting Next.js with the default image loader, the Image Optimization API can optimize remotely hosted images if configured (not enabled by default). If those images contain malicious content, they can cause CPU exhaustion in `/_next/image` endpoints.
• If you are using `config.images.remotePatterns`, only the patterns in that array are impacted.
• If you are using `config.images.unoptimized: true`, you are NOT impacted.
• If you are using `config.images.loader: 'custom'`, you are NOT impacted.
• If you are using Vercel, you are NOT impacted.
Workarounds
If you cannot upgrade immediately, you can avoid the expensive work by setting `config.experimental.imgOptSkipMetadata : true`.
Related
Alias · CVE (1)
- CVE-2026-64644 Next.js is a React framework for building full-stack web applications. vulnerability
Weakness · CWE (1)
- CWE-407 Inefficient Algorithmic Complexity weakness
References
- https://github.com/vercel/next.js/security/advisories/GHSA-q8wf-6r8g-63ch web
- https://github.com/vercel/next.js/pull/96006 web
- https://github.com/vercel/next.js/commit/93cb90891402fa4c47798d03cb9e05c13233766c web
- https://github.com/vercel/next.js package
- https://github.com/vercel/next.js/releases/tag/v15.5.21 web
- https://github.com/vercel/next.js/releases/tag/v16.2.11 web