Advisory

GHSA-q8wf-6r8g-63ch

Also known as: CVE-2026-64644

Summary

Next.js: Denial of Service in the Image Optimization API using SVGs

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-07-22 23:02 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

next

npm · All systems

Affected

  • introduced 15.5.0, fixed 15.5.21 (semver)

Fixed versions

15.5.21

Fix

next

npm · All systems

Affected

  • introduced 16.0.0, fixed 16.2.11 (semver)

Fixed versions

16.2.11

Fix

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

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences