happy-dom makes server requests to attacker-chosen URLs when parsing HTML
If your server uses happy-dom to read HTML from untrusted sources, an attacker can make your server fetch internal or cloud-only web addresses and possibly see the replies. This can leak cloud access keys.
| Severity | HighCVSS 8.6 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yeshappy-dom 21.0.0 · since 28 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker supplies HTMLMalicious iframe or stylesheet link is embedded
- 2Server parses the HTMLhappy-dom parses it with default settings
- 3Server sends HTTP requestRequest goes to attacker-chosen internal URL
- 4Internal or cloud endpoint repliesMetadata or internal API responds
- 5Response reaches attackerCredentials or data may be exposed
- ResultInternal data or cloud credentials exposed
What happened
happy-dom loads iframe src and link rel="stylesheet" href URLs over real HTTP by default (disableIframePageLoading and disableCSSFileLoading default to false), causing Server-Side Request Forgery (SSRF) when untrusted HTML is parsed on the server.
Are you affected?
You are affected if you run the npm package happy-dom version 20.14.6 or earlier on a server and parse HTML you do not fully control (for example scraping, email HTML rendering, server-side rendering, or testing with external HTML input).
| Package / product | Affected versions | Fixed in |
|---|---|---|
| happy-dom · npm | <= 20.14.6 | 21.0.0 |
What to do
- Update happy-dom to 21.0.0 or later
- Until updated, set disableIframePageLoading and disableCSSFileLoading to true when creating Window objects
- Block outbound requests from your server to internal and cloud metadata addresses such as 169.254.169.254 and private IP ranges
- Do not parse untrusted HTML on servers that can reach internal networks or cloud metadata services
Timeline
- 28 Oct 2026, 21:06 UTCPublicly disclosed
- 28 Oct 2026, 21:06 UTCReported by GitHub Advisory · GitHub Advisory
- 28 Oct 2026, 21:07 UTCPicked up by Zero Radar
- 28 Oct 2026, 21:17 UTCNVD reported on it · NVD
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- Happy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTMLGitHub Advisory · 28 Oct 2026, 21:06 UTC
- CVE-2026-118660NVD · 28 Oct 2026, 21:16 UTC
Technical details
- ID
- CVE-2026-118660 · GHSA-c8p4-j97h-3vg8
- CVSS
- 8.6 / 10
- Disclosed
- 28 Oct 2026, 21:06 UTC
- On Zero Radar
- 28 Oct 2026, 21:07 UTC (1 min after disclosure)
- Last change
- 28 Oct 2026, 21:17 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works