HighGHSA-9gr3-7897-pp7mCVE-2021-39178

XSS in Image Optimization API for Next.js

Published 1 Sept 2021 · Updated 8 Jul 2026

Affected package

nextnpm
Affected
>=10.0.0 <11.1.1
Fixed in
11.1.1
Update to the fixed version for your release line, for example:npm install next@11.1.1

Details

Impact

  • Affected: All of the following must be true to be affected
  • Next.js between version 10.0.0 and 11.1.0
  • The next.config.js file has `images.domains` array assigned
  • The image host assigned in `images.domains` allows user-provided SVG
  • Not affected: The next.config.js file has `images.loader` assigned to something other than default
  • Not affected: Deployments on Vercel are not affected

Patches

Next.js v11.1.1

Is GHSA-9gr3-7897-pp7m in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected next, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.