p PatchFirst

PatchFirst · Latest vulnerabilities

happy-dom vulnerabilities

Vulnerabilities published for happy-dom in the last 30 days: 1. Listed in the KEV catalogue: 0.

RSS ↗
Filter vulnerabilities
Clear filters

Vulnerabilities: 6

  1. CVE-2026-115895

    High · CVSS 8.8Public exploitFix available

    Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution

    Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. From 17.0.0 until 21.0.4, packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts accepts a named ESM import alias without validating that it is a JavaScript binding identifier before inserting it into a generated destructuring binding. With enableJavaScriptEvaluation enabled, attacker-controlled HTML or module source can use an invalid alias that becomes a valid default initializer after compilation, causing the generated JavaScript to execute in the Node.js host process. The demonstrated reachable path uses a JSON module import attribute, which

    • Update to 21.0.4
    Published Updated
  2. CVE-2026-34226

    High · CVSS 7.5EPSS 0.59%Fix available

    Happy DOM's fetch credentials include uses page-origin cookies instead of target-origin cookies

    Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Versions prior to 20.8.9 may attach cookies from the current page origin (`window.location`) instead of the request target URL when `fetch(..., { credentials: "include" })` is used. This can leak cookies from origin A to destination B. Version 20.8.9 fixes the issue.

    • Update to 20.8.9
    Published Updated
  3. CVE-2026-33943

    High · CVSS 8.8EPSS 0.97%Fix available

    Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code

    Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. In versions 15.10.0 through 20.8.7, a code injection vulnerability in `ECMAScriptModuleCompiler` allows an attacker to achieve Remote Code Execution (RCE) by injecting arbitrary JavaScript expressions inside `export { }` declarations in ES module scripts processed by happy-dom. The compiler directly interpolates unsanitized content into generated code as an executable expression, and the quote filter does not strip backticks, allowing template literal-based payloads to bypass sanitization. Version 20.8.8 fixes the issue.

    • Update to 20.8.8
    Published Updated
  4. CVE-2025-62410

    Critical · CVSS 9.4EPSS 0.35%Public exploitFix available

    --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom

    In versions before 20.0.2, it was found that --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom. The untrusted script and the rest of the application still run in the same Isolate/process, so attackers can deploy prototype pollution payloads to hijack important references like "process" in the example below, or to hijack control flow via flipping checks of undefined property. This vulnerability is due to an incomplete fix for CVE-2025-61927. The vulnerability is fixed in 20.0.2.

    • Update to 20.0.2
    Published Updated
  5. CVE-2025-61927

    High · CVSS 7.2EPSS 0.64%Public exploitFix available

    Happy-DOM has VM Context Escape

    Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. 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

    • Update to 20.0.0
    Published Updated
  6. CVE-2024-51757

    Critical · CVSS 9.3EPSS 0.77%Fix available

    Fixes security vulnerability that allowed for server side code to be executed by a <script> tag

    happy-dom is a JavaScript implementation of a web browser without its graphical user interface. Versions of happy-dom prior to 15.10.2 may execute code on the host via a script tag. This would execute code in the user context of happy-dom. Users are advised to upgrade to version 15.10.2. There are no known workarounds for this vulnerability.

    • Update to 15.10.2
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →