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.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)1.8%top 21.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npmnext12.1.0GHSA-fmvm-x8mv-47mj

Affected products (as reported)

VendorProductVersions
vercel next.js >= 10.0.0, < 12.1.0

Weakness: CWE-451 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

References