{ "canonical_id": "nextjs--CVE-2021-39178", "system_id": "nextjs", "display_name": "Next.js", "category": "frameworks", "advisory_mode": "core", "title": "XSS in Image Optimization API for Next.js", "summary": "### Impact\n- **Affected:** All of the following must be true to be affected\n - Next.js between version 10.0.0 and 11.1.0\n - The `next.config.js` file has [`images.domains`](https://nextjs.org/docs/basic-features/image-optimization#domains) array assigned\n - The image host assigned in [`images.domains`](https://nextjs.org/docs/basic-features/image-optimization#domains) allows user-provided SVG\n- **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\n- **Not affected**: Deployments on [Vercel](https://vercel.com) are not affected\n\n### Patches\n[Next.js v11.1.1](https://github.com/vercel/next.js/releases/tag/v11.1.1)\n\n", "published_at": "2021-09-01T18:24:22Z", "updated_at": "2026-03-13T22:00:20.154452Z", "severity": "low", "cvss_score": 3.1, "exploit_status": "unknown", "source_confidence": "official", "official_source_url": "https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m", "secondary_source_urls": [ "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/vercel/next.js", "https://github.com/vercel/next.js/releases/tag/v11.1.1" ], "aliases": [ "CVE-2021-39178", "GHSA-9gr3-7897-pp7m" ], "cve_ids": [ "CVE-2021-39178" ], "ghsa_ids": [ "GHSA-9gr3-7897-pp7m" ], "osv_ids": [ "GHSA-9gr3-7897-pp7m" ], "affected_versions": [ "introduced=10.0.0, fixed<11.1.1" ], "fixed_versions": [ "11.1.1" ], "package_name": "next", "render_markdown": true, "case_path": "07-framework-security/frameworks/nextjs/cases/nextjs-cve-2021-39178.md", "secure_code_topics": [ "authz-server-side-recheck", "proxy-trust-boundary", "token-cookie-storage", "xss-output-encoding" ], "status": "generated", "triage_reasons": [], "metadata": { "source_names": [ "OSV Next.js" ], "source_kinds": [ "osv-batch" ], "candidate_count": 1 } }