CVE-2022-23646

Improper CSP in Image Optimization API for Next.js

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.

Category

5.9
CVSS
Severity: Medium
CVSS 3.1 •
CVSS 2.0 •
EPSS 1.40% Top 25%
Third-Party Advisory github.com Third-Party Advisory github.com Third-Party Advisory github.com
Affected: vercel next.js
Published at:
Updated at:

References

Link Tags
https://github.com/vercel/next.js/security/advisories/GHSA-fmvm-x8mv-47mj issue tracking patch mitigation third party advisory
https://github.com/vercel/next.js/pull/34075 issue tracking third party advisory patch
https://github.com/vercel/next.js/releases/tag/v12.1.0 third party advisory release notes

Frequently Asked Questions

What is the severity of CVE-2022-23646?
CVE-2022-23646 has been scored as a medium severity vulnerability.
How to fix CVE-2022-23646?
To fix CVE-2022-23646, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2022-23646 being actively exploited in the wild?
It is possible that CVE-2022-23646 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-23646?
CVE-2022-23646 affects vercel next.js.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.