Vulnerability · Published Aug 30, 2021 · Assigned by GitHub_M
CVE-2021-39178XSS in Image Optimization API for Next.js versions between 10.0.0 and 11.1.0
High 7.5
In plain English
A high-severity cross-site scripting in next.js from vercel. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 67% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Next.js is a React framework. Versions of Next.js between 10.0.0 and 11.0.0 contain a cross-site scripting vulnerability. In order for an instance to be affected by the vulnerability, the `next.config.js` file must have `images.domains` array assigned and the image host assigned in `images.domains` must allow user-provided SVG. If the `next.config.js` file has `images.loader` assigned to something other than default or the instance is deployed on Vercel, the instance is not affected by the vulnerability. The vulnerability is patched in Next.js version 11.1.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | next | 11.1.1 | GHSA-9gr3-7897-pp7m |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m x_refsource_CONFIRM
- https://github.com/vercel/next.js/releases/tag/v11.1.1 x_refsource_MISC