chore(deps): update dependency happy-dom to v20 [security] #100
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.0
GitHub Vulnerability Alerts
CVE-2024-51757
Impact
Consumers of the NPM package
happy-dom
Patches
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.
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.0.0
Compare Source
v19.0.2
Compare Source
👷♂️ Patch fixes
:scope
that didn't work correctly for direct descendants to root - By @capricorn86 in task #1620v19.0.1
Compare Source
👷♂️ Patch fixes
@happy-dom/server-renderer
config using CLI - By @capricorn86 in task #1908v19.0.0
Compare Source
💣 Breaking Changes
require()
@happy-dom/jest-environment
package - By @capricorn86 in task #1730@happy-dom/jest-environment
- By @capricorn86 in task #1730🎨 Features
@happy-dom/server-renderer
- By @capricorn86 in task #1730import.meta
to 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 #1730Browser
instance - By @capricorn86 in task #1730setTimeout()
andrequestAnimationFrame()
- By @capricorn86 in task #1730beforeContentCallback
andheaders
toBrowserFrame.goto()
,BrowserFrame.goBack()
,BrowserFrame.goForward()
,BrowserFrame.goSteps()
andBrowserFrame.reload()
- By @capricorn86 in task #1730PopStateEvent
and 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 #1730XMLHttpRequest
to prevent it from being set to an invalid state if a listener throws an Error - By @capricorn86 in task #1730v18.0.1
Compare Source
👷♂️ Patch fixes
v18.0.0
Compare Source
💣 Breaking Changes
skipLibCheck
set 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.closed
andBrowserFrame.closed
- By @capricorn86 in task #1154VirtualConsolePrinter.close()
andVirtualConsolePrinter.closed
- By @capricorn86 in task #1154CookieContainer.clearCookies()
- By @capricorn86 in task #1154v17.6.3
Compare Source
👷♂️ Patch fixes
v17.6.2
Compare Source
👷♂️ Patch fixes
v17.6.1
Compare Source
🎨 Features
fetch.disableStrictSSL
under IBrowserSettings in the Wikiv17.6.0
Compare Source
v17.5.9
Compare Source
👷♂️ Patch fixes
HTMLLinkElement
for a browser frame property that becomes null during teardown of aWindow
- By @capricorn86 in task #1800v17.5.8
Compare Source
👷♂️ Patch fixes
Element.classList
to return the wrong items - By @capricorn86 in task #1812v17.5.7
Compare Source
👷♂️ Patch fixes
v17.5.6
Compare Source
👷♂️ Patch fixes
v17.5.5
Compare Source
v17.5.4
Compare Source
👷♂️ Patch fixes
ReadableStream
was locked after being cloned - By @MarcMcIntosh in task #1493v17.5.3
Compare Source
👷♂️ Patch fixes
previousSibling
andnextSibling
toMutationObserver
records when a child is removed - By @uxuip in task #1803v17.5.2
Compare Source
👷♂️ Patch fixes
«
and»
in query selectors used by the React 19.1 "useId" hook - By @terrymun in task #1785v17.5.1
Compare Source
👷♂️ Patch fixes
v17.5.0
Compare Source
🎨 Features
XMLHttpRequest.overrideMimeType()
- By @maxmil in task #1782v17.4.9
Compare Source
👷♂️ Patch fixes
FormData
- By @juandiegombr in task #1790v17.4.8
Compare Source
👷♂️ Patch fixes
v17.4.7
Compare Source
👷♂️ Patch fixes
Request
- By @elierotenberg in task #1779v17.4.6
Compare Source
👷♂️ Patch fixes
File
- By @dyabol in task #1788v17.4.5
Compare Source
👷♂️ Patch fixes
HTMLAnchorElement
- By @maxmil in task #1775v17.4.4
Compare Source
👷♂️ Patch fixes
setTimeout()
to prevent Bun from logging a "TimeoutNaNWarning" - By @lekoala in task #1772v17.4.3
Compare Source
👷♂️ Patch fixes
settings.errorCapture
is not set to "tryAndCatch" andhandleEvent
is used for the event listener - By @capricorn86 in task #1766v17.4.2
Compare Source
👷♂️ Patch fixes
Element.setAttribute()
- By @capricorn86 in task #1750v17.4.1
Compare Source
👷♂️ Patch fixes
v17.4.0
Compare Source
🎨 Features
KeyboardEvent.getModifierState()
method - By @karpiuMG in task #1467v17.3.2
Compare Source
👷♂️ Patch fixes
v17.3.1
Compare Source
👷♂️ Patch fixes
<svg xmlns:link=""></svg>
) - By @capricorn86 in task #1750v17.3.0
Compare Source
🎨 Features
v17.2.4
Compare Source
👷♂️ Patch fixes
HTMLElement.innerText
- By @karpiuMG in task #1151v17.2.3
Compare Source
👷♂️ Patch fixes
Element.contentEditable
should be synced with the "contenteditable" attribute - By @karpiuMG in task #1463v17.2.2
Compare Source
👷♂️ Patch fixes
v17.2.1
Compare Source
👷♂️ Patch fixes
v17.2.0
Compare Source
🎨 Features
v17.1.13
Compare Source
👷♂️ Patch fixes
v17.1.12
Compare Source
👷♂️ Patch fixes
Event
class - By @alan910127 in task #1747v17.1.11
Compare Source
👷♂️ Patch fixes
Element.cloneNode()
- By @Mas0nShi in task #1745v17.1.10
Compare Source
👷♂️ Patch fixes
v17.1.9
Compare Source
👷♂️ Patch fixes
v17.1.8
Compare Source
👷♂️ Patch fixes
v17.1.7
Compare Source
👷♂️ Patch fixes
FormData
requests - By @aberigle and @capricorn86 in task #1741v17.1.6
Compare Source
🎨 Features
AbortSignal
as option toEventTarget.addEventListener()
- By @karpiuMG in task #1540v17.1.5
Compare Source
👷♂️ Patch fixes
HTMLElement.dataset
should return undefined for properties not found - By @karpiuMG in task #1689v17.1.4
Compare Source
👷♂️ Patch fixes
TreeWalker
didn't work according to spec - By @capricorn86 in task #1605v17.1.3
Compare Source
👷♂️ Patch fixes
NamedNodeMap
- By @capricorn86 in task #1728Element.getAttributeNames()
when attributes where using prefixesv17.1.2
Compare Source
👷♂️ Patch fixes
AbortSignal.reason
can have any type - By @btea in task #1718AbortSignal.reason
should be the object used when the promise is rejected - By @btea in task #1718v17.1.1
Compare Source
🎨 Features
@media
selector "forced-colors" - By @capricorn86 in task #1727👷♂️ Patch fixes
@media
,@supports
and@container
rules - By @capricorn86 in task #1727CSSStyleSheet
was instantiated internally without a Window context, causing errors to not be thrown correctly inCSSStyleSheet
methods - By @capricorn86 in task #1727CSSStyleSheet
methods, so that they work according to spec - By @capricorn86 in task #1727v17.1.0
Compare Source
🎨 Features
v17.0.4
Compare Source
👷♂️ Patch fixes
v17.0.3
Compare Source
👷♂️ Patch fixes
v17.0.2
Compare Source
👷♂️ Patch fixes
HTMLAnchorElement
,HTMLAreaElement
,HTMLButtonElement
,HTMLIFrameElement
,HTMLInputElement
,HTMLMediaElement
,HTMLObjectElement
,HTMLSelectElement
andHTMLTextAreaElement
- By @capricorn86 in task #1714v17.0.1
Compare Source
👷♂️ Patch fixes
querySelector()
returns the first item that appears in the DOM for grouped selectors - By @christiango in task #1710v17.0.0
Compare Source
💣 Breaking Changes
import
andexport
statements in JavaScript files🎨 Features
waitUntilComplete()
- By @capricorn86 in task #1567debug.traceWaitUntilComplete
in the Wiki for IBrowserSettingsHTMLLinkElement
- By @capricorn86 in task #320HTMLLinkElement.relList.supports()
- By @capricorn86 in task #320Request.mode
- By @capricorn86 in task #320HTMLScriptElement.blocking
,HTMLScriptElement.crossOrigin
,HTMLScriptElement.fetchPriority
,HTMLScriptElement.noModule
,HTMLScriptElement.integrity
,HTMLScriptElement.referrerPolicy
- By @capricorn86 in task #320credentials
andreferrerPolicy
when fetching styles and scripts - By @capricorn86 in task #320Element.setAttribute()
- By @OlaviSau in task #1706👷♂️ Patch fixes
afterAsyncResponse
fetch interceptor in virtual server requests - By @capricorn86 in task #320ShadowRoot
of a custom element that was upgraded from aHTMLElement
wasn't considered connected to the DOM - By @capricorn86 in task #320v16.8.1
Compare Source
👷♂️ Patch fixes
v16.8.0
Compare Source
🎨 Features
insertRow()
anddeleteRow()
toHTMLTableSectionElement
- By @christiango in task #1708v16.7.3
Compare Source
👷♂️ Patch fixes
v16.7.2
Compare Source
👷♂️ Patch fixes
v16.7.1
Compare Source
👷♂️ Patch fixes
ICookie
,IOptionalCookie
,CookieSameSiteEnum
andIVirtualServer
as exports to the index file - By @capricorn86 in task #1693CookieContainer.addCookies()
- By @capricorn86 in task #1693v16.7.0
Compare Source
🎨 Features
v16.6.0
Compare Source
🎨 Features
querySelector()
,querySelectorAll()
andmatches()
(e.g. ".a ~ .b") - By @karpiuMG in task #1683v16.5.3
Compare Source
👷♂️ Patch fixes
v16.5.2
Compare Source
👷♂️ Patch fixes
Event.target
should be the target element after an event has been dispatched - By @capricorn86 in task #1529v16.5.1
Compare Source
👷♂️ Patch fixes
Comment
,Text
andDocumentFragment
are not instances of their corresponding property onWindow
- By @capricorn86 in task #1577v16.5.0
Compare Source
🎨 Features
GlobalRegistrator.isRegistered
- By @capricorn86 in task #1670v16.4.3
Compare Source
👷♂️ Patch fixes
Response
during tear down of theWindow
- By @capricorn86 in task #1669v16.4.2
Compare Source
👷♂️ Patch fixes
v16.4.1
Compare Source
👷♂️ Patch fixes
document.documentElement.innerHTML
isnt parsed correctly since v16 - By @capricorn86 in task #1663v16.4.0
Compare Source
🎨 Features
v16.3.0
Compare Source
🎨 Features
v16.2.9
Compare Source
👷♂️ Patch fixes
HTMLInputElement.defaultChecked
property - By @capricorn86 in task #1587v16.2.8
Compare Source
👷♂️ Patch fixes
HTMLFormElement
orHTMLSelectElement
- By @capricorn86 in task #1628v16.2.7
Compare Source
👷♂️ Patch fixes
<script>
and<style>
elements should not be decoded or encoded - By @capricorn86 in task #1564v16.2.6
Compare Source
👷♂️ Patch fixes
<form>
and<select>
elements - By @capricorn86 in task #1608v16.2.5
Compare Source
👷♂️ Patch fixes
HTMLFormElement
andHTMLSelectElement
was wrong which affected the methodsremove()
,replaceWith()
,before()
,after()
,append()
,prepend()
,replaceChildren()
andinsertAdjacentElement()
- By @capricorn86 in task #1637v16.2.4
Compare Source
👷♂️ Patch fixes
BrowserFrame.goto()
andDetachedBrowserFrame.goto()
- By @capricorn86 in task #1627v16.2.3
Compare Source
👷♂️ Patch fixes
HTMLTableCellElement.headers
property - By @capricorn86 in task #1634v16.2.2
Compare Source
👷♂️ Patch fixes
querySelector()
orquerySelectorAll()
as selector - By @chocolateboy in task #1640v16.2.1
Compare Source
👷♂️ Patch fixes
XMLHttpRequest
when "withCredentials" is false - By @saitonakamura in task #1631v16.2.0
Compare Source
🎨 Features
Window.scrollBy()
andElement.scrollBy()
- By @OlaviSau in task #1623v16.1.0
Compare Source
🎨 Features
getElementsByClassName()
- By @kylehalleman in task #1551v16.0.1
Compare Source
👷♂️ Patch fixes
document.implementation.createHTMLDocument()
) not being considered as connected to a DOM that was introduced in v16 - By @capricorn86 in task #1647v16.0.0
[Compare Source](https://redirect.github.com/capricorn86/happy-dom/com
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.