{"id":"CVE-2021-39178","published":"2021-08-30T23:55:09Z","modified":"2024-08-04T01:58:18Z","title":"XSS in Image Optimization API for Next.js versions between 10.0.0 and 11.1.0","vendor":"vercel","product":"next.js","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01139,"percentile":0.67384,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vercel/next.js/releases/tag/v11.1.1","tags":["x_refsource_MISC"]}],"priority":{"score":18.7,"factors":[{"name":"EPSS percentile","points":13.48},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"vercel","affectedVersions":[{"vendor":"vercel","product":"next.js","versions":[">= 10.0.0, < 11.1.1"]}],"affected":[{"ecosystem":"npm","package":"next","vulnerableRanges":[">=10.0.0, <11.1.1"],"patched":["11.1.1"],"from":["GHSA-9gr3-7897-pp7m"],"provenance":"source"}],"summary":{"text":"A cross-site scripting flaw in the Image Optimization API of Next.js, the React framework from Vercel, affects versions between 10.0.0 and 11.1.0. An attacker with network access can exploit it when the instance's next.config.js sets images.domains to a host that serves user-provided SVG, with a user needing to interact with a crafted link or page, and the issue does not apply if images.loader is set to something other than the default or the instance runs on Vercel.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:33:58Z"},"euvd":{"id":"EUVD-2021-2024","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2020-5284","published":"2020-03-30","fixed":"9.3.2","kev":false},{"cve":"CVE-2020-15242","published":"2020-10-08","fixed":"9.5.4","kev":false},{"cve":"CVE-2021-37699","published":"2021-08-11","fixed":"11.1.0","kev":false,"link":{"from":"CVE-2021-37699","to":"CVE-2021-39178","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:next","fromFixed":"11.1.0","toFixed":"11.1.1","daysApart":19}]}},{"cve":"CVE-2021-39178","published":"2021-08-30","fixed":"11.1.1","kev":false},{"cve":"CVE-2021-43803","published":"2021-12-09","fixed":"12.0.5","kev":false,"link":{"from":"CVE-2021-39178","to":"CVE-2021-43803","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:next","fromFixed":"11.1.1","toFixed":"11.1.3","daysApart":101}]}},{"cve":"CVE-2022-21721","published":"2022-01-28","fixed":"12.0.9","kev":false},{"cve":"CVE-2022-23646","published":"2022-02-17","fixed":"12.1.0","kev":false}],"package":"npm:next"}}