Skip to content

← Actionable
High, CVSS 8.8amended

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

CVE-2026-115895GHSA-834v-8h66-3h79

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (happy-dom 21.0.4), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm happy-dom

    Affected
    >= 17.0.0, <= 21.0.3
    Fixed in
    21.0.4

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
  • CVE-2026-115895: 0.47% estimated exploitation activity in the next 30 days; percentile 40.96 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The ESM compiler in happy-dom@20.14.5 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 importName in the local export { ... } handler, but the named import handler still places an unvalidated alias directly into code context. These issues were confirmed through the public Window and <script type="module" APIs using the published happy-dom npm package. The PoC reaches the Node.js host process, obtains node:fs, and creates a proof directory on the host filesystem. Confirmed affected versions The PoC was directly tested against: - happy-dom@17.0.0 - happy-dom@20.0.0 - happy-dom@20.1.0 - happy-dom@20.14.5 The same PoC does not trigger on happy-dom@16.8.1. The…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-834v-8h66-3h79

  2. Revision 2 · amended ·

    Amended from osv record GHSA-834v-8h66-3h79

  3. Revision 1 · created ·

    Published from ghsa record GHSA-834v-8h66-3h79

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-115895

Advisory: Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution
IDs: CVE-2026-115895, GHSA-834v-8h66-3h79
Record: https://patchnext.com/advisories/cve-2026-115895 (revision 3, source checked 26 Oct 2026, 13:07 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 8.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: happy-dom 21.0.4. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm happy-dom: affected >= 17.0.0, <= 21.0.3; fixed in 21.0.4

## Suggested inspection (read-only)
- `npm ls happy-dom --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on happy-dom.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-834v-8h66-3h79 (GitHub-reviewed advisory GHSA-834v-8h66-3h79 lists affected ranges: npm happy-dom >=17.0.0 <=21.0.3)
- Verified: https://osv.dev/vulnerability/GHSA-834v-8h66-3h79 (OSV record GHSA-834v-8h66-3h79 lists affected ranges: npm happy-dom >=17.0.0 <21.0.4 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…