{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-39178","id":"CVE-2021-39178","title":"XSS in Image Optimization API for Next.js versions between 10.0.0 and 11.1.0","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","descriptionLong":"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.","published":"2021-08-30T23:55:09.000Z","updated":"2026-10-20T10:54:53.096950995Z","reserved":"2021-08-16T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"high","products":["vercel next.js"],"affectedProducts":[{"vendor":"vercel","product":"next.js","defaultStatus":null,"versions":[{"status":"affected","version":">= 10.0.0, < 11.1.1"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"next","purl":"pkg:npm/next","ranges":[">=10.0.0 <11.1.1"],"fixed":["11.1.1"],"advisory":"GHSA-9gr3-7897-pp7m"}],"cwes":["CWE-79"],"aliases":["GHSA-9gr3-7897-pp7m"],"references":[{"url":"https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/vercel/next.js/releases/tag/v11.1.1","tags":["x_refsource_MISC","x_transferred","Patch","Release Notes","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39178","tags":["advisory"]},{"url":"https://github.com/vercel/next.js/pull/28620","tags":["web"]},{"url":"https://github.com/vercel/next.js/commit/7afc97c5744b38bdf36aa7f87625f438224688aa","tags":["web"]},{"url":"https://github.com/vercel/next.js","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.01139,"epssPercentile":0.67285,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-39178","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39178","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-39178","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-9gr3-7897-pp7m","ok":true,"note":"GHSA-9gr3-7897-pp7m"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-39178","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["nextjs"],"critical":[],"attention":null}