NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-64644: Next.js: Denial of Service in the Image Optimization API using SVGs

mediumCVSS 4.0 6.3GHSA-q8wf-6r8g-63ch

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.

Published Jul 22, 2026

Affected packages

next

Ecosystem
npm
Affected
>= 15.5.0, < 15.5.21
Fixed in
15.5.21
Check
npm ls next

next

Ecosystem
npm
Affected
>= 16.0.0, < 16.2.11
Fixed in
16.2.11
Check
npm ls next

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to idealinsane.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries