chore(deps): update devdependency happy-dom to v20 [security] - #241
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update devdependency happy-dom to v20 [security]#241renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
requested review from
deetz99,
kialj876,
kris-daxiom,
pwei1018 and
thorwolpert
as code owners
October 11, 2025 01:12
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
October 21, 2025 17:42
428130a to
3f27de8
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
November 11, 2025 00:53
3f27de8 to
307ee77
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
November 18, 2025 11:37
307ee77 to
8256af3
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
December 3, 2025 18:00
72430a0 to
c21947f
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
December 31, 2025 14:47
c21947f to
d4be088
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
January 8, 2026 17:45
d4be088 to
d337d93
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
January 23, 2026 19:29
b659632 to
66cae64
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
February 2, 2026 21:15
66cae64 to
46d2240
Compare
renovate
Bot
requested review from
hfekete,
mengdong19,
ozamani9gh and
stevenc987
as code owners
February 2, 2026 21:15
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
February 17, 2026 18:38
8b91931 to
26a5276
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
March 5, 2026 15:50
26a5276 to
076c07a
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
March 13, 2026 11:56
076c07a to
543543c
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
April 8, 2026 14:43
8e01eab to
5073f1f
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
April 29, 2026 20:27
5073f1f to
0baaa6d
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
3 times, most recently
from
May 12, 2026 11:14
20a6a52 to
b581bad
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
May 18, 2026 17:56
b581bad to
6cb3f92
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
June 1, 2026 23:15
d409c52 to
76e355a
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
June 11, 2026 16:15
76e355a to
507cd98
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
July 12, 2026 15:35
507cd98 to
93fb732
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
July 21, 2026 00:14
54196e6 to
7340d25
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
July 24, 2026 20:52
7340d25 to
41e6515
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
July 30, 2026 19:54
41e6515 to
87c66b8
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
2 times, most recently
from
August 14, 2026 11:05
003810f to
5f53502
Compare
renovate
Bot
force-pushed
the
renovate/npm-happy-dom-vulnerability
branch
from
August 26, 2026 10:58
5f53502 to
85c6807
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^13.10.1→^20.0.0happy-dom allows for server side code to be executed by a <script> tag
CVE-2024-51757 / GHSA-96g7-g7g9-jxw8
More information
Details
Impact
Consumers of the NPM package
happy-domPatches
The security vulnerability has been patched in v15.10.2
Workarounds
No easy workarounds to my knowledge
References
#1585
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Happy DOM: VM Context Escape can lead to Remote Code Execution
CVE-2025-61927 / GHSA-37j7-fg3j-429f
More information
Details
Escape of VM Context gives access to process level functionality
Summary
Happy DOM v19 and lower contains a security vulnerability that puts the owner system at the risk of RCE (Remote Code Execution) attacks.
A Node.js VM Context is not an isolated environment, and if the user runs untrusted JavaScript code within the Happy DOM VM Context, it may escape the VM and get access to process level functionality.
It seems like what the attacker can get control over depends on if the process is using ESM or CommonJS. With CommonJS the attacker can get hold of the
require()function to import modules.Happy DOM has JavaScript evaluation enabled by default. This may not be obvious to the consumer of Happy DOM and can potentially put the user at risk if untrusted code is executed within the environment.
Reproduce
CommonJS (Possible to get hold of require)
ESM (Not possible to get hold of import or require)
Potential Impact
Server-Side Rendering (SSR)
Testing Frameworks
Any test suite using Happy-DOM with untrusted content may be at risk
Attack Scenarios
Recommended Immediate Actions
eval()andFunction()can still be used within the Happy DOM VM without any known security riskTechnical Root Cause
All classes and functions inherit from Function. By walking the constructor chain it's possible to get hold of Function at process level. As Function can evaluate code from strings, it's possible to execute code at process level.
Running Node with the "--disallow-code-generation-from-strings" flag protects against this.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:PReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies
CVE-2026-34226 / GHSA-w4gp-fjgq-3q4g
More information
Details
Summary
happy-dommay attach cookies from the current page origin (window.location) instead of the request target URL whenfetch(..., { credentials: "include" })is used. This can leak cookies from origin A to destination B.Details
In
packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts(getRequestHeaders()), cookie selection is performed withoriginURL:Here,
originURLrepresents the page URL, not the request destination URL. For outgoing requests, cookie lookup should use the request URL (for example:new URL(options.request[PropertySymbol.url])).PoC Script Content
Environment:
happy-dom20.6.1*.127.0.0.1.nip.ioReproduction steps:
page_cookie=PAGE_ONLYona.127.0.0.1.nip.ioapi_cookie=API_ONLYonb.127.0.0.1.nip.iocredentials: "include"Cookieheader received by the target hostExpected:
api_cookie=API_ONLYpage_cookie=PAGE_ONLYActual (observed):
page_cookie=PAGE_ONLYapi_cookie=API_ONLYObserved output:
Impact
Cross-origin sensitive information disclosure (cookie leakage).
Impacted users are applications relying on
happy-dombrowser-like fetch behavior in authenticated/session-based flows (for example SSR/test/proxy-like scenarios), where cookies from one origin can be sent to another origin.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
capricorn86/happy-dom (happy-dom)
v20.8.9Compare Source
👷♂️ Patch fixes
v20.8.8Compare Source
👷♂️ Patch fixes
v20.8.7Compare Source
👷♂️ Patch fixes
Consolewith commonIConsoleinterface to support latest version of Bun - By @YevheniiKotyrlo in task #1845v20.8.6Compare Source
👷♂️ Patch fixes
Request.formData()should honor "Content-Type" header - By @brianhelba in task #2106v20.8.5Compare Source
👷♂️ Patch fixes
connectedCallback()- By @capricorn86 in task #2110v20.8.4Compare Source
👷♂️ Patch fixes
v20.8.3Compare Source
👷♂️ Patch fixes
EventinEventTarget.dispatchEvent()- By @capricorn86 in task #2054v20.8.2Compare Source
👷♂️ Patch fixes
Event.cancelBubbleandEvent.defaultPreventedwhen callingEvent.initEvent()- By @capricorn86 in task #2090v20.8.1Compare Source
👷♂️ Patch fixes
v20.8.0Compare Source
🎨 Features
v20.7.2Compare Source
👷♂️ Patch fixes
v20.7.1Compare Source
👷♂️ Patch fixes
>) and universal (*) query selectors - By @Cherry in task #2078v20.7.0Compare Source
🎨 Features
Window.getScreenDetails()- By @TrevorBurnham in task #1923ScreenfromEventTarget- By @TrevorBurnham in task #1923v20.6.5Compare Source
👷♂️ Patch fixes
v20.6.4Compare Source
👷♂️ Patch fixes
v20.6.3Compare Source
👷♂️ Patch fixes
[data-value="it's a test"]) - By @capricorn86 in task #2034v20.6.2Compare Source
👷♂️ Patch fixes
v20.6.1Compare Source
👷♂️ Patch fixes
rgba()- By @atzzCokeK in task #2042v20.6.0Compare Source
🎨 Features
@happy-dom/global-registratorpackage - By @capricorn86 in task #2060v20.5.5Compare Source
👷♂️ Patch fixes
v20.5.4Compare Source
👷♂️ Patch fixes
v20.5.3Compare Source
👷♂️ Patch fixes
v20.5.2Compare Source
👷♂️ Patch fixes
v20.5.1Compare Source
👷♂️ Patch fixes
HTMLInputElement.stepUp()andHTMLInputElement.stepDown()to work according to spec - By @stevematney in task #1955v20.5.0Compare Source
👷♂️ Patch fixes
import typeandexport type) - By @capricorn86 in task #2055v20.4.0Compare Source
🎨 Features
v20.3.9Compare Source
👷♂️ Patch fixes
v20.3.8Compare Source
👷♂️ Patch fixes
focusNodeandfocusOffsetin the Selection API returned incorrect values - By @skoch13 in task #1850v20.3.7Compare Source
👷♂️ Patch fixes
v20.3.6Compare Source
👷♂️ Patch fixes
<details>by clicking on a child of the<summary>element - By @Nxooah in task #1928v20.3.5Compare Source
👷♂️ Patch fixes
BrowserFrameURLto avoid mock interference - By @marchaos in task #1964CookieURLUtility- By @marchaos in task #1968v20.3.4Compare Source
👷♂️ Patch fixes
<p>elements per HTML spec - By @TrevorBurnham in task #1949EventTargetshould not call arbitrary on* properties - By @TrevorBurnham in task #1895v20.3.3Compare Source
👷♂️ Patch fixes
KeyboardEvent- By @TrevorBurnham in task #1897Node.getRootNode()returns correct root for detached shadow trees - By @TrevorBurnham in task #1941Node.contains()to work for<select>and<form>elements - By @TrevorBurnham in task #1876setTimeout()withqueueMicrotask()where appropriate - By @TrevorBurnham in task #1880XMLEncodeUtilitywith pre-compiledRegExpand lookup tables - By @TrevorBurnham in task #1983parseFloat()for "Cache-Control" header max-age parsing - By @TrevorBurnham in task #1985RegExpflags inHTMLParser- By @TrevorBurnham in task #1981v20.3.2Compare Source
👷♂️ Patch fixes
PropertySymbol.bodyto set body incloneBodyStream- By @TrevorBurnham in task #1963DOMTokenListadd/remove with Set for O - By @TrevorBurnham in task #1989WebSocketURLs - By @TrevorBurnham in task #1975v20.3.1Compare Source
👷♂️ Patch fixes
DataTransfer.getData()- By @marchaos in task #1965XMLHttpRequest- By @rexxars in task #1890v20.3.0Compare Source
🎨 Features
RegExpto convert ASCII character casing to improve performance - By @TrevorBurnham in task #1886v20.2.0Compare Source
🎨 Features
Element.classList.contains()instead of splittingclassNamein query selectors to improve performance as it's cached - By @TrevorBurnham in task #1884v20.1.1Compare Source
👷♂️ Patch fixes
querySelector()- By @TrevorBurnham in task #1882querySelector()to improve performance - By @TrevorBurnham in task #1882v20.1.0Compare Source
🎨 Features
BrowserPage.evaluateModule()andBrowserFrame.evaluateModule()- By @capricorn86 in task #1944moduleto the browser settings - By @capricorn86 in task #1944import()to JavaScript evaluation - By @capricorn86 in task #1944type="module"on script elementsWebSocket- By @capricorn86 in task #1944CloseEvent- By @capricorn86 in task #1944render.setupScriptandrender.modeto the configuration in @happy-dom/server-renderer - By @capricorn86 in task #1944urlstorenderItemsin the configuration in @happy-dom/server-renderer - By @capricorn86 in task #1944ServerRendererin @happy-dom/server-renderer - By @capricorn86 in task #1944👷♂️ Patch fixes
v20.0.11Compare Source
👷♂️ Patch fixes
v20.0.10Compare Source
👷♂️ Patch fixes
v20.0.9Compare Source
👷♂️ Patch fixes
v20.0.8Compare Source
👷♂️ Patch fixes
previousSibling()andnextSibling()didn't work inHTMLSelectElementandHTMLFormElement- By @capricorn86 in task #1939<tr>) should be valid inside a<template>element - By @capricorn86 in task #1939v20.0.7Compare Source
👷♂️ Patch fixes
>=operator in media query parser - By @lkritsimas in task #1869v20.0.6Compare Source
👷♂️ Patch fixes
DOMTokenList.forEach(),Headers.forEach()andNodeList.forEach()to be spec compliant - By @ikeyan in task #1858v20.0.5Compare Source
👷♂️ Patch fixes
TreeWalker.currentNodeshould validate if the value is aNode- By @capricorn86 in task #1935v20.0.4Compare Source
👷♂️ Patch fixes
FormDataif they are the submitter - By @maxmil and @karpiuMG in task #1859
v20.0.3Compare Source
👷♂️ Patch fixes
v20.0.2Compare Source
👷♂️ Patch fixes
@happy-dom/server-renderer- By @capricorn86 in task #1934v20.0.1Compare Source
👷♂️ Patch fixes
--disallow-code-generation-from-stringswasn't enough to protect against attackers escaping the VM context and accessing process-level functions. Big thanks to @cristianstaicu for reporting this!v20.0.0Compare Source
I avoid making breaking changes as much as possible in Happy DOM. When I have to make a breaking change, I try to keep it as minimal as possible. This could be a breaking change that impacts many projects, and I am truly sorry if you are negatively affected by this.
💣 Breaking Changes
v19.0.2Compare Source
👷♂️ Patch fixes
:scopethat didn't work correctly for direct descendants to root - By @capricorn86 in task #1620v19.0.1Compare Source
👷♂️ Patch fixes
@happy-dom/server-rendererconfig using CLI - By @capricorn86 in task #1908v19.0.0Compare Source
💣 Breaking Changes
require()@happy-dom/jest-environmentpackage - By @capricorn86 in task #1730@happy-dom/jest-environment- By @capricorn86 in task #1730🎨 Features
@happy-dom/server-renderer- By @capricorn86 in task #1730import.metato the ESM compiler - By @capricorn86 in task #1730:scope- By @capricorn86 in task #1620MediaList- By @capricorn86 in task #1730CSSKeywordValue,CSSStyleValue,StylePropertyMap,StylePropertyMap,StylePropertyMapReadOnly- By @capricorn86 in task #1730Browserinstance - By @capricorn86 in task #1730setTimeout()andrequestAnimationFrame()- By @capricorn86 in task #1730beforeContentCallbackandheaderstoBrowserFrame.goto(),BrowserFrame.goBack(),BrowserFrame.goForward(),BrowserFrame.goSteps()andBrowserFrame.reload()- By @capricorn86 in task #1730PopStateEventand trigger the event when navigating the page history usingHistory.pushState()- By @capricorn86 in task #1730ResponseCache.fileSystem.load()andResponseCache.fileSystem.save()for storing and loading cache from the file system - By @capricorn86 in task [#1730](https://redirect.github.com/capricorn86/happy-dom/issues/1Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.