Vulnerability · Published Feb 17, 2022 · Assigned by GitHub_M
CVE-2022-23646Improper CSP in Image Optimization API for Next.js
Medium 5.9
In plain English
A medium-severity security flaw in next.js from vercel. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.8% (higher than 79% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | next | 12.1.0 | GHSA-fmvm-x8mv-47mj |
Affected products (as reported)
Weakness: CWE-451 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
References
- https://github.com/vercel/next.js/security/advisories/GHSA-fmvm-x8mv-47mj x_refsource_CONFIRM
- https://github.com/vercel/next.js/pull/34075 x_refsource_MISC
- https://github.com/vercel/next.js/releases/tag/v12.1.0 x_refsource_MISC