NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

XSS in Image Optimization API for Next.jsGHSA-9gr3-7897-pp7m

HIGHFix: vercel/next.js#28620

GHSA-9gr3-7897-pp7m is a high-severity (CVSS 7.5) Cross-site Scripting (XSS) vulnerability in next. A fix is available for next — see the affected versions and patch details below.

Also known asCVE-2021-39178
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 24, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs67th percentile — riskier than 67% of all scored CVEsHighest risk
0.20%0.68%1.16%1.64%0.7%1.1%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

61Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
nextnpm
94.7Mdownloads / week

Description

Impact

  • Affected: All of the following must be true to be affected
    • Next.js between version 10.0.0 and 11.1.0
    • The next.config.js file has images.domains array assigned
    • The image host assigned in images.domains allows user-provided SVG
  • Not affected: The next.config.js file has images.loader assigned to something other than default
  • Not affected: Deployments on Vercel are not affected

Patches

Next.js v11.1.1

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmnext≥ 10.0.0&&< 11.1.111.1.1npm install next@11.1.1

Affected Products

1 product · 1 configurations
Application
next.jsvercel
≥ 10.0.0 && < 11.1.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for next, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update next to 11.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-9gr3-7897-pp7m is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Frequently Asked Questions

### Impact - **Affected:** All of the following must be true to be affected - Next.js between version 10.0.0 and 11.1.0 - The `next.config.js` file has [`images.domains`](https://nextjs.org/docs/basic-features/image-optimization#domains) array assigned - The image host assigned in [`images.domains`](https://nextjs.org/docs/basic-features/image-optimization#domains) allows user-provided SVG - **Not affected**: The `next.config.js` file has [`images.loader`](https://nextjs.org/docs/basic-features/image-optimization#loader) assigned to something other than default - **Not affected**:
O3 Security · Impact-Aware SCA

Is GHSA-9gr3-7897-pp7m in your dependencies?

Find it across npm, including transitive dependencies.

XSS in Image Optimization API for Next.js (High 7.5)