happy-dom
21.0.4 · 20 Oct 2026MIT37.6M / weekRepositorynpmAtom feed
20.14.6 is the newest release of 20.x.
In short
1 new
Security
5 advisories affect 20.1.0; 21.0.4 fixes the others
- HighHappy DOM: SSRF via iframe and link stylesheet when parsing untrusted HTMLGHSA-c8p4-j97h-3vg8 · 28 Oct 2026No fix yet
- HighHappy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code executionGHSA-834v-8h66-3h79 · 23 Oct 2026Fixed in 21.0.4
- HighHappy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookiesGHSA-w4gp-fjgq-3q4g · 29 Mar 2026Fixed in 20.8.9
- HighHappy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable codeGHSA-6q6h-j7hj-3r64 · 26 Mar 2026Fixed in 20.8.8
- ModerateHappy DOM has cookie scope forgery: no DNS-label boundary on Domain= matching , attacker origin sets victim cookiesGHSA-5fpq-26gf-qwcr · 28 Oct 2026Fixed in 20.14.6
Release note
:art: Features
Adds support for
BrowserPage.evaluateModule()andBrowserFrame.evaluateModule()- By @capricorn86 in task #1944Adds support for
moduleto the browser settings - By @capricorn86 in task #1944This makes it possible to add a custom resolver or a node module resolver
Adds support for dynamic
import()to JavaScript evaluation - By @capricorn86 in task #1944It was previously only supported when using
type="module"on script elements
Adds support for
WebSocket- By @capricorn86 in task #1944Adds support for
CloseEvent- By @capricorn86 in task #1944Adds support for
render.setupScriptandrender.modeto the configuration in @happy-dom/server-renderer - By @capricorn86 in task #1944Changes name from
urlstorenderItemsin the configuration in @happy-dom/server-renderer - By @capricorn86 in task #1944Adds support for rendering HTML strings to
ServerRendererin @happy-dom/server-renderer - By @capricorn86 in task #1944It previously only had support for rendering URLs
This makes it easier to add server-rendering as a hook to frameworks
Makes JavaScript evaluation disabled by default in @happy-dom/server-renderer - By @capricorn86 in task #1944
:construction_worker_man: Patch fixes
Several fixed to the EcmaScript module compiler (esm) - By @capricorn86 in task #1944
Fixes issue where rendering using Worker's didn't work in @happy-dom/server-renderer - By @capricorn86 in task #1944
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.