chore(deps): update dev dependency happy-dom to v20 [security]#65
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dev dependency happy-dom to v20 [security]#65renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
2824236 to
f9b2711
Compare
ffe20ab to
3100e57
Compare
3100e57 to
2d39480
Compare
2d39480 to
c69ab6f
Compare
c69ab6f to
5dd5aa7
Compare
5dd5aa7 to
1f80e20
Compare
1f80e20 to
7d46dba
Compare
7d46dba to
2f26df4
Compare
2f26df4 to
1559039
Compare
1559039 to
343873c
Compare
343873c to
a676481
Compare
a676481 to
a8ef114
Compare
a8ef114 to
28700c2
Compare
28700c2 to
2cbf66a
Compare
cd5b3af to
8442fbb
Compare
8442fbb to
82bcf81
Compare
82bcf81 to
1f6c8ac
Compare
1f6c8ac to
523872e
Compare
523872e to
f40eb34
Compare
f40eb34 to
22d2ddb
Compare
22d2ddb to
82d4b16
Compare
82d4b16 to
3a88cbd
Compare
3a88cbd to
6c9a4c5
Compare
6c9a4c5 to
faf4979
Compare
faf4979 to
25338b0
Compare
25338b0 to
a850da7
Compare
a850da7 to
ee61ddb
Compare
ee61ddb to
a2d242e
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:
^6.0.4→^20.0.0GitHub Vulnerability Alerts
CVE-2024-51757
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
CVE-2025-61927
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.
Release Notes
capricorn86/happy-dom (happy-dom)
v20.8.3Compare Source
👷♂️ Patch fixes
v20.8.2Compare Source
👷♂️ Patch fixes
Event.cancelBubbleandEvent.defaultPreventedwhen callingEvent.initEvent()- By @capricorn86 in task #2090v20.8.1Compare Source
👷♂️ Patch fixes
v20.8.0Compare Source
v20.7.2Compare Source
👷♂️ Patch fixes
v20.7.1Compare Source
v20.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
v20.6.0Compare Source
v20.5.5Compare Source
v20.5.4Compare Source
👷♂️ Patch fixes
v20.5.3Compare Source
v20.5.2Compare Source
v20.5.1Compare Source
v20.5.0Compare Source
v20.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
v20.3.3Compare Source
v20.3.2Compare Source
v20.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 #1944👷♂️ Patch fixes
v20.0.11Compare Source
v20.0.10Compare Source
v20.0.9Compare Source
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👷♂️ Patch fixes
BrowserFrame.goto()- By @capricorn86 in task #1730XMLHttpRequestto prevent it from being set to an invalid state if a listener throws an Error - By @capricorn86 in task #1730v18.0.1Compare Source
👷♂️ Patch fixes
v18.0.0Compare Source
💣 Breaking Changes
skipLibCheckset to "false" in the typescript configuration for projects with a strict configurationBrowserContext.close()now throws an error when trying to close the default context of a browser - By @capricorn86 in task #1154🎨 Features
Browser.closed,BrowserContext.closed,BrowserPage.closedandBrowserFrame.closed- By @capricorn86 in task #1154VirtualConsolePrinter.close()andVirtualConsolePrinter.closed- By @capricorn86 in task #1154CookieContainer.clearCookies()- By @capricorn86 in task #1154v17.6.3Compare Source
👷♂️ Patch fixes
v17.6.2Compare Source
👷♂️ Patch fixes
v17.6.1Compare Source
🎨 Features
fetch.disableStrictSSLunder IBrowserSettings in the Wikiv17.6.0Compare Source
v17.5.9Compare Source
👷♂️ Patch fixes
HTMLLinkElementfor a browser frame property that becomes null during teardown of aWindow- By @capricorn86 in task #1800v17.5.8Compare Source
👷♂️ Patch fixes
Element.classListto return the wrong items - By @capricorn86 in task #1812v17.5.7Compare Source
👷♂️ Patch fixes
v17.5.6Compare Source
👷♂️ Patch fixes
v17.5.5Compare Source
v17.5.4Compare Source
👷♂️ Patch fixes
ReadableStreamwas locked after being cloned - By @MarcMcIntosh in task #1493v17.5.3Compare Source
👷♂️ Patch fixes
previousSiblingandnextSiblingtoMutationObserverrecords when a child is removed - By @uxuip in task #1803v17.5.2Compare Source
👷♂️ Patch fixes
«and»in query selectors used by the React 19.1 "useId" hook - By @terrymun in task #1785v17.5.1Compare Source
👷♂️ Patch fixes
v17.5.0Compare Source
🎨 Features
XMLHttpRequest.overrideMimeType()- By @maxmil in task #1782v17.4.9Compare Source
👷♂️ Patch fixes
FormData- By @juandiegombr in task #1790v17.4.8Compare Source
👷♂️ Patch fixes
v17.4.7Compare Source
👷♂️ Patch fixes
Request- By @elierotenberg in task #1779v17.4.6Compare Source
👷♂️ Patch fixes
File- By @dyabol in task #1788v17.4.5Compare Source
👷♂️ Patch fixes
HTMLAnchorElement- By @maxmil in task #1775v17.4.4Compare Source
👷♂️ Patch fixes
setTimeout()to prevent Bun from logging a "TimeoutNaNWarning" - By @lekoala in task #1772v17.4.3Compare Source
👷♂️ Patch fixes
settings.errorCaptureis not set to "tryAndCatch" andhandleEventis used for the event listener - By @capricorn86 in task #1766v17.4.2Compare Source
👷♂️ Patch fixes
Element.setAttribute()- By @capricorn86 in task #1750v17.4.1Compare Source
👷♂️ Patch fixes
v17.4.0Compare Source
🎨 Features
KeyboardEvent.getModifierState()method - By @karpiuMG in task #1467v17.3.2Compare Source
👷♂️ Patch fixes
v17.3.1Compare Source
👷♂️ Patch fixes
<svg xmlns:link=""></svg>) - By @capricorn86 in task #1750v17.3.0Compare Source
🎨 Features
v17.2.4Compare Source
👷♂️ Patch fixes
HTMLElement.innerText- By @karpiuMG in task #1151v17.2.3Compare Source
👷♂️ Patch fixes
Element.contentEditableshould be synced with the "contenteditable" attribute - By @karpiuMG in task #1463v17.2.2Compare Source
👷♂️ Patch fixes
v17.2.1Compare Source
👷♂️ Patch fixes
v17.2.0Compare Source
🎨 Features
v17.1.13Compare Source
👷♂️ Patch fixes
v17.1.12Compare Source
👷♂️ Patch fixes
Eventclass - By @alan910127 in task #1747v17.1.11Compare Source
👷♂️ Patch fixes
Element.cloneNode()- By @Mas0nShi in task #1745v17.1.10Compare Source
👷♂️ Patch fixes
v17.1.9Compare Source
👷♂️ Patch fixes
v17.1.8Compare Source
👷♂️ Patch fixes
v17.1.7Compare Source
👷♂️ Patch fixes
FormDatarequests - By @aberigle and @capricorn86 in task #1741v17.1.6Compare Source
🎨 Features
AbortSignalas option toEventTarget.addEventListener()- By @karpiuMG in task #1540v17.1.5Compare Source
:construction
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 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.