Skip to main content

happy-dom CVE-2026-118660

| EUVDEUVD-2026-112467 HIGH
Server-Side Request Forgery (SSRF) (CWE-918)
2026-10-28 GitHub_M GHSA-c8p4-j97h-3vg8
8.6
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply attacker-controlled HTML to server
  2. Exploit
    happy-dom parses iframe src / link stylesheet href
  3. Execution
    Server issues real HTTP request to internal or metadata URL
  4. Impact
    Exfiltrate cloud credentials or internal API responses

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires that the application use happy-dom on the server to parse HTML an attacker can influence, running an affected version (<= 20.14.6) with the default settings disableIframePageLoading: false and disableCSSFileLoading: false, and that the attacker-supplied HTML include an <iframe src> or <link rel="stylesheet" href> pointing at an internal or cloud-metadata URL. No authentication, user interaction, or opt-in configuration is needed on those defaults (AV:N/AC:L/PR:N/UI:N). Exploitation is LIMITED where the application does not feed untrusted HTML to happy-dom, where the operator has already set disableIframePageLoading/disableCSSFileLoading to true (or upgraded to 21.0.0 where loading is off by default), or where egress to internal ranges and 169.254.169.254 is blocked at the network layer; per the advisory, iframe srcdoc content is not affected.

Impact

This is a genuine, actionable SSRF (CWE-918) rather than a paper-high CVSS. The supplied CVSS:3.1 vector AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N (8.6) is internally consistent with the mechanism: an attacker who controls parsed HTML needs no authentication and no victim interaction, and the scope change (S:C) correctly reflects that the forged request reaches systems other than happy-dom itself - internal services and cloud metadata endpoints. The GHSA advisory includes a verified proof-of-concept whose test output ('SSRF HIT: GET /iframe-ssrf' and '/stylesheet-ssrf') confirms the requests actually fire against default settings, so exploitability is demonstrated, not theoretical. Counter-signals: the CVE is NOT listed in CISA KEV, so there is no confirmed active exploitation, and no EPSS score, SSVC decision string, or 'automatable' rating was provided in the input, so the probabilistic widespread-exploitation picture cannot be stated - do not treat the demonstrated PoC as evidence of in-the-wild use. The vuln.today priority label is 'this_week', consistent with a serious-but-not-emergency item. The one real caveat is the actual blast radius being fully conditional on application wiring (the server must parse attacker-influenced HTML with happy-dom), which the raw 8.6 does not capture. Net: prioritize patching to 21.0.0 this week; the confidentiality impact is real where the vulnerable usage pattern exists.

Exploit ScenarioDerived

An application uses happy-dom server-side to parse HTML it does not fully control (e.g. web scraping, email/HTML rendering, or SSR of user-supplied markup). An attacker submits HTML containing <iframe src="http://169.254.169.254/latest/meta-data/iam/security-credentials/"> or <link rel="stylesheet" href="http://internal-service/...">, and happy-dom issues a real server-side GET to that URL, returning or exposing cloud IAM credentials or internal API responses. A verified proof-of-concept exists in the GHSA-c8p4-j97h-3vg8 advisory, and because the vector is AV:N/AC:L/PR:N/UI:N no authentication, special complexity, or user interaction is required against default (<=20.14.6) configurations.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 28, 2026

Server-side request forgery in happy-dom (versions up to and including 20.14.6) lets a remote attacker force the Node.js process to issue real HTTP requests to arbitrary internal or cloud-metadata endpoints whenever untrusted HTML containing an <iframe src> or <link rel="stylesheet" href> is parsed under the library's default settings. No authentication, user interaction, or configuration opt-in is required on those defaults, and returned content can expose confidential data such as AWS/GCP/Azure instance credentials, hence the high confidentiality impact (CVSS 8.6, scope changed). No CISA KEV listing or confirmed active exploitation was reported at time of analysis, although the GitHub security advisory and PR #2502 ship a verified proof-of-concept that demonstrates request receipt; external resource loading is off by default from 21.0.0.

RemediationAI

Vendor-released patch: upgrade happy-dom to 21.0.0 or later, where enableCSSFileLoading and enableIframePageLoading both default to false and external subresource fetches only occur when explicitly opted in (see the advisory GHSA-c8p4-j97h-3vg8 and the v21.0.0 release notes). Because the 21.0.0 change renames the settings, re-audit any code or server-renderer CLI invocation that passed --browser.disableCSSFileLoading or the disable* options, and enable the new enable* flags only for content you trust; the trade-off is that documents relying on external stylesheets or iframes will no longer fetch them, which can shift CSS-dependent rendering and layout assertions. If upgrading must wait, set disableIframePageLoading: true and disableCSSFileLoading: true in browser settings, accepting the same loss of external CSS/iframe fidelity, and note srcdoc iframes are unaffected by this gate. As a network-layer compensating control, block egress from the server running happy-dom to 169.254.169.254 and to private/internal ranges (for example via a metadata-endpoint proxy with IMDSv2 enforcement or an egress allowlist), understanding that this limits rather than eliminates open SSRF to any host still reachable on the allowlist. Per the assessment, exploitation is not possible where untrusted HTML is never fed to happy-dom, where those settings are already disabled, or where such egress is blocked.

Affected VersionsENISA

happy-dom < 21.0.0

Affected Packages

npm happy-dom fix: 21.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

happy-dom (CPE cpe:2.3:a:capricorn86:happy-dom) is a JavaScript implementation of the browser DOM without a graphical interface, published on npm and commonly used server-side for unit testing, server-side rendering, web scraping and rendering untrusted email HTML. The flaw is CWE-918 (Server-Side Request Forgery): happy-dom's browser settings shipped with disableIframePageLoading and disableCSSFileLoading both set to false, so parsing HTML caused HTMLIFrameElement instances and <link rel="stylesheet"> elements to perform real outbound HTTP fetches against the attacker-supplied src/href rather than resolving them in an isolated, non-networking document. Because those subresource loads are implicit in HTML parsing, an application that never intended to fetch remote content inherits the request. The fix in PR #2502 / commit 0a99c7525a1d0043e3182843ae33466ab7b19e74 inverts the model: DefaultBrowserSettings now ships enableCSSFileLoading: false and enableIframePageLoading: false, the old disable* flags are marked deprecated, HTMLIFrameElement skips loading unless enableIframePageLoading is set, and the server-renderer CLI exposes the new opt-in flags instead of --browser.disableCSSFileLoading. The advisory notes that iframe srcdoc content is not affected by the loading gate. The changed-scope metric reflects that the vulnerable component is the parsing library while the impacted resource is the host's internal network and cloud metadata service.

Know when Happy Dom gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.6 HIGH
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
vuln.today AI 8.6 HIGH

Attacker-controlled HTML triggers unauthenticated network requests with no interaction (AV:N/AC:L/PR:N/UI:N); the forged request reaches other systems (S:C) and discloses internal/credential data (C:H), with no integrity or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
Oct 28, 2026 - 21:19 EUVD
CVE Published
Oct 28, 2026 - 20:23 cve.org
HIGH 8.6

DescriptionCVE.org

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Prior to 21.0.0, Happy DOM loads iframe src URLs and link rel="stylesheet" href URLs by default while parsing untrusted HTML on the server because disableIframePageLoading and disableCSSFileLoading default to false. An attacker who controls parsed HTML can therefore cause server-side requests to arbitrary internal or cloud endpoints without an application opt-in and may expose confidential responses or credentials returned by those endpoints. This issue is fixed in version 21.0.0.

Technical POC Analysis

CWE-918 (Server-Side Request Forgery).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-118660 is a high-severity server-side request forgery vulnerability in happy-dom (versions ≤20.14.6) that allows remote attackers to force Node.js processes to make arbitrary HTTP requests, potentially exposing cloud credentials and internal data. This affects any application parsing untrusted HTML with default settings, and although no active exploitation has been reported, a verified PoC raises the risk of imminent attacks.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Apply interim mitigations: upgrade to happy-dom 21.0.0+ where possible to disable external resource loading by default, or configure older versions to disable external resource loading and sanitize untrusted HTML to strip <iframe> and <link> tags before parsing. Additionally, implement network egress filtering to block access to cloud metadata endpoints and other internal resources from application servers.

Threat Intelligence Overview

Prevalence
Medium
very popular npm DOM library, but exploitable server-side untrusted-HTML parsing is a narrower pattern
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy