Security readout for executives and security teams
Plain-English summary
This issue can let an attacker run unwanted script in a user's browser through Next.js image handling, but only in a narrow setup. Exposure requires affected Next.js versions, configured image domains, and an allowed image host that accepts user-provided SVG. Vercel deployments and non-default image loaders are reported as not affected.
Executive priority
Prioritize remediation for public-facing, self-hosted Next.js applications that use the built-in image optimizer with configured external image domains. The issue is high severity but conditional, so exposure validation should come before broad emergency response.
Technical view
CVE-2021-39178 is a CWE-79 cross-site scripting flaw in the Next.js Image Optimization API. Sources identify affected Next.js versions as 10.0.0 through before 11.1.1, with the fix in 11.1.1. The vulnerable condition depends on default image loading, images.domains configuration, and a listed host allowing user-provided SVG.
Likely exposure
Most likely exposed systems are self-hosted Next.js applications using versions >=10.0.0 and <11.1.1, the default image loader, and images.domains entries pointing to hosts where users can upload SVG content.
Exploitation context
The CVSS vector shows network attack surface, high complexity, no privileges, and required user interaction. The supplied sources do not show CISA KEV listing or active exploitation evidence. Risk is meaningful where the exact configuration exists because browser script execution can affect user sessions and data.
Researcher notes
The key research question is configuration reachability, not just package version. Confirm default image loader use, non-Vercel hosting, images.domains presence, and whether any trusted image host can serve user-controlled SVG. The source bundle does not provide exploit telemetry.
Mitigation direction
- Upgrade Next.js to version 11.1.1 or later.
- Review next.config.js for images.domains usage.
- Remove or restrict image domains that allow user-provided SVG.
- Confirm whether deployment is on Vercel or uses a non-default image loader.
- If upgrade is delayed, follow current vendor guidance.
Validation and detection
- Inventory Next.js applications and dependency versions.
- Flag versions >=10.0.0 and <11.1.1 for review.
- Inspect next.config.js for images.domains entries.
- Check whether listed image hosts permit user-provided SVG uploads.
- Confirm images.loader and hosting model for affected applications.
- Verify remediation by confirming Next.js 11.1.1 or later.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-79: User-session and phishing behavior lookup
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupCVE-2021-39178 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- High
- CVSS
- 7.5 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H1.65.9Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7.5HighVector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/vercel/next.js/security/advisories/GHSA-9gr3-7897-pp7mCVE reference · x_refsource_CONFIRM
- https://github.com/vercel/next.js/releases/tag/v11.1.1CVE reference · x_refsource_MISC
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
