CVEMETERBack to radar
OFFICIAL RECORD · JavaScript packages

CVE-2021-39178

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 7.5 · high

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_M
CVSS: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

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T16:57:41.748ZCISA KEV
cvssverified2026-11-19T12:56:08.603ZCVE Program
epssverified2026-11-19T16:04:31.549ZFIRST EPSS
patchesverified2026-11-19T12:51:57.337ZOSV
affectedverified2026-11-19T12:56:08.603ZCVE Program
lifecycleverified2026-11-19T12:56:08.603ZCVE 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 JSON
OSV · 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 JSON

Correction 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 typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundarynpm / packagenextNot a distribution channel11.1.1Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history