CVE-2021-39178
XSS in Image Optimization API for Next.js versions between 10.0.0 and 11.1.0
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 1.139% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:57:41.748Z. Public exploit availability is not used to set this status.
CVSS 3.1 · 7.5 · published by GitHub_MCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Assessment source · checked 2026-11-19T12:56:08.603Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T16:57:41.748Z | CISA KEV |
| cvss | verified | 2026-11-19T12:56:08.603Z | CVE Program |
| epss | verified | 2026-11-19T16:04:31.549Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:51:57.337Z | OSV |
| affected | verified | 2026-11-19T12:56:08.603Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:56:08.603Z | CVE Program |
Affected versions and configuration
vercel next.js; default status: unknown: >= 10.0.0, < 11.1.1 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "vercel",
"product": "next.js",
"versions": [
{
"status": "affected",
"version": ">= 10.0.0, < 11.1.1"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
},
{
"url": "https://github.com/vercel/next.js/releases/tag/v11.1.1",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-04T01:58:18.141Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-9gr3-7897-pp7m",
"aliases": [
"CVE-2021-39178"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "10.0.0"
},
{
"fixed": "11.1.1"
}
]
}
],
"package": {
"name": "next",
"purl": "pkg:npm/next",
"ecosystem": "npm"
},
"versions": [],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/09/GHSA-9gr3-7897-pp7m/GHSA-9gr3-7897-pp7m.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7m",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39178",
"type": "ADVISORY"
},
{
"url": "https://github.com/vercel/next.js/pull/28620",
"type": "WEB"
},
{
"url": "https://github.com/vercel/next.js/commit/7afc97c5744b38bdf36aa7f87625f438224688aa",
"type": "WEB"
},
{
"url": "https://github.com/vercel/next.js",
"type": "PACKAGE"
},
{
"url": "https://github.com/vercel/next.js/releases/tag/v11.1.1",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": "2021-08-31T00:15:00Z",
"github_reviewed_at": "2021-08-31T20:01:51Z"
}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | npm / package | next | Not a distribution channel | 11.1.1 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- OSVConsulted: 2026-11-19T12:51:57.337ZArchived source JSON
Source publication: 2021-09-01T18:24:22.000Z
Source modification: 2026-07-08T06:27:32.575ZDocument fingerprint
7d4eb95abe8a9661807a717b59c5cebbe020ba401a580c1ab04c7b391af1539c - CVE ProgramConsulted: 2026-11-19T12:56:08.603ZArchived source JSON
Source publication: 2021-08-30T23:55:09.000Z
Source modification: 2024-08-04T01:58:18.141ZDocument fingerprint
750dbd5386bd684e6dca66d113a7b87314acb2a3bd20313447e5b721a7ea5ace - CISA KEVConsulted: 2026-11-19T16:57:41.748ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:31.549ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
3868b84f1e1acd503d18b7d8039c9c0af96978ffa639a1d9a6683f7f07e072a5
Official status history
- UNKNOWN → PUBLISHED · · evidence