CVE-2021-39178
mediumpriority · track · 24EPSS 0.011 · 66 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 4.3–7.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-9gr3-7897-pp7mXSS in Image Optimization API for Next.js2021-09-01ghsa · osvUS
### 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`](https://nextjs.org/docs/basic-features/image-optimization#domains) array assigned - The image host assigned in [`images.domains`](https://nextjs.org/docs/basic-features/image-optimization#domains) allows user-provided SVG - **Not affected**: The `next.config.js` file has [`images.loader`](https://nextjs.org/docs/basic-features/image-optimization#loader) assigned to something other than default - **Not affected**: Deployments on [Vercel](https://vercel.com) are not affected ### Patches [Next.js v11.1.1](https://github.com/vercel/next.js/releases/tag/v11.1.1)
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/vercel/next.js/releases/tag/v11.1.1cnnvd
- https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7mcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2021-39178cnnvd
- https://github.com/vercel/next.js/releases/tag/v11.1.1enisa_euvd
- https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7menisa_euvd
- https://github.com/vercel/next.js/releases/tag/v11.1.1PatchRelease NotesThird Party Advisorynvd
- https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7mPatchThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan