vercel/next.js · Security
XSS in Image Optimization API for Next.js
- GHSA ID
- GHSA-9gr3-7897-pp7m
- CVE ID
- CVE-2021-39178
- Severity
- high
- Published
- Updated
- CVSS
- 7.5 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- CVSS v3
- 7.5 · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Description
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.jsfile hasimages.domainsarray assigned - The image host assigned in
images.domainsallows user-provided SVG
- Not affected: The
next.config.jsfile hasimages.loaderassigned to something other than default - Not affected: Deployments on Vercel are not affected
Patches
CWEs
- CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
- https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m ↗
- https://github.com/vercel/next.js/releases/tag/v11.1.1 ↗
- https://nvd.nist.gov/vuln/detail/CVE-2021-39178 ↗
- https://github.com/vercel/next.js/pull/28620 ↗
- https://github.com/vercel/next.js/commit/7afc97c5744b38bdf36aa7f87625f438224688aa ↗
- https://github.com/advisories/GHSA-9gr3-7897-pp7m ↗