Vulnerabilities

Vulnerability · CVE-2026-115895

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

Published Oct 23, 2026 · catalog updated Oct 23, 2026 · Red Hat Red Hat Enterprise Linux

Last checked Nov 5, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-115895. EPSS is 0.47%. Act only if a listed version of Red Hat Red Hat Enterprise Linux is installed.

Gaps on this record

  • No vendor fix or required action is stored. Compare the linked advisory before you change production.

Same product and reporting

Severity
High8.8
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.47%
Remediation
Version ranges on file
Affected products
npm happy-dom · vendor capricorn86 happy-dom

## Summary The ESM compiler in does not validate imported local binding aliases before interpolating them into generated JavaScript. As a result, an invalid ESM import alias can be transformed into a valid JavaScript destructuring default initializer and executed. This appears to be an alternate injection path and incomplete remediation of GHSA-6q6h-j7hj-3r64 / CVE-2026-33943. The previous fix validates in the local handler, but the named import handler still places an unvalidated directly into code context. These issues were confirmed through the public and APIs using the published npm package. The PoC reaches the Node.js host , obtains , and creates a proof directory on the host filesystem. ## Confirmed affected versions The PoC was directly tested against: - - - - The same PoC does not trigger on . The ESM compiler was introduced by commit , first released in . The vulnerable interpolation remains present through , the latest release at the time of testing. Suggested affected range: No patched version is currently available. ## Preconditions - JavaScript evaluation is enabled with . - Attacker-controlled HTML or module source is processed by Happy DOM. - This may affect SSR, preview, scraping, or testing services that evaluate externally supplied HTML. ## Technical details In , the named import handler splits an import specifier and extracts its alias: Unlike the patched handler, the value of is not validated as a JavaScript identifier. It is subsequently inserted directly into generated binding syntax: Consider the following source: This is invalid ECMAScript module syntax. Node.js rejects it at the token. Happy DOM instead transforms it into the equivalent of: This generated JavaScript is valid. Because the imported JSON object does not contain a property, the default initializer executes. The attribute is relevant because the compiler only generates its circular import resolver for ESM imports: Using a JSON module prevents the malicious alias from being emitte

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • npm happy-dom>= 17.0.0, <= 21.0.3
  • vendor capricorn86 happy-domversion unspecified

How to fix CVE-2026-115895

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-115895. EPSS is 0.47%. Act only if a listed version of Red Hat Red Hat Enterprise Linux is installed.

Which versions are affected?

Compare what you have installed with >= 17.0.0, <= 21.0.3. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-94: Code Injection. EPSS 0.47%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 23, 2026 · Red Hat Security Data

    Detected

    happy-dom: happy-dom: Arbitrary code execution via unvalidated ECMAScript Module import alias

  2. Oct 23, 2026 · GitHub Advisory Database

    Updated

    ## Summary The ESM compiler in does not validate imported local binding aliases before interpolating them into generated JavaScript. As a result, an invalid ESM import alias can be transformed into a valid JavaScript destructuring default initializer and executed. This appears to be an alternate injection path and incomplete remediation of GHSA-6q6h-j7hj-3r64 / CVE-2026-33943. The previous fix val

Sources

  • CVE.orgVulnerability recordCVE-2026-115895

    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 befor

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-115895

    30-day exploitation probability 0.47%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-834v-8h66-3h79

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

    github.com
  • Red Hat Security DataVendor advisoryCVE-2026-115895

    happy-dom: happy-dom: Arbitrary code execution via unvalidated ECMAScript Module import alias

    access.redhat.com

References

Freshness

Last verified in this catalog Nov 5, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSNov 5, 2026
  • Red Hat Security DataOct 26, 2026
  • CVE.orgOct 24, 2026
  • GitHub Advisory DatabaseOct 24, 2026