CVE-2021-39178

XSS in Image Optimization API for Next.js versions between 10.0.0 and 11.1.0

MEDIUM
6.1
CVSS Score
Published: August 30, 2021 at 11:55 PM UTC
Updated: June 17, 2026 at 04:03 AM UTC
1 product affected across 1 vendorNext.js

Using next.js by vercel?

Get instant alerts when new vulnerabilities affect next.js - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 1%

Description

Next.js is a React framework. Versions of Next.js between 10.0.0 and 11.0.0 contain a cross-site scripting vulnerability. In order for an instance to be affected by the vulnerability, the `next.config.js` file must have `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 or the instance is deployed on Vercel, the instance is not affected by the vulnerability. The vulnerability is patched in Next.js version 11.1.1.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 11.1.110.0.0 ≤ v < 11.1.1
Affected range stops below 11.1.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

x_refsource_MISCPatchRelease NotesThird Party Advisory
https://github.com/vercel/next.js/releases/tag/v11.1.1

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card