Skip to content
Heist/ feed
Back to feed
HighFix available

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

Type: advisorySources: OSV

## 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 `

Products
happy-dom
Affected versions
Not specified
Fixed versions
21.0.4
CVEs
CVE-2026-115895
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 03:20 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 23 Oct 2026, 22:06 UTC

## 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 `

osv:GHSA-834v-8h66-3h79

happy-dom

Fixed versions: 21.0.4

Complete source record
{
  "id": "4db8edc0cc6e4b5e59679b7019391a3ddd999941301e8e57e9106708beb90b2b",
  "url": "https://osv.dev/vulnerability/GHSA-834v-8h66-3h79",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution",
    "summary": "## 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 `",
    "evidence": "osv:GHSA-834v-8h66-3h79",
    "products": [
      {
        "name": {
          "value": "happy-dom",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "21.0.4",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-834v-8h66-3h79",
      "aliases": [
        "CVE-2026-115895",
        "GHSA-834v-8h66-3h79"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "17.0.0"
                },
                {
                  "fixed": "21.0.4"
                }
              ]
            }
          ],
          "package": {
            "name": "happy-dom",
            "purl": "pkg:npm/happy-dom",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-834v-8h66-3h79/GHSA-834v-8h66-3h79.json",
            "last_known_affected_version_range": "<= 21.0.3"
          }
        }
      ],
      "modified": "2026-10-23T22:15:03.526440756Z",
      "provider": "osv",
      "references": [
        "https://github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79",
        "https://github.com/capricorn86/happy-dom/pull/2537",
        "https://github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13",
        "https://github.com/capricorn86/happy-dom",
        "https://github.com/capricorn86/happy-dom/releases/tag/v21.0.4"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-94"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-23T22:06:13Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-115895",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 427054,
  "published_at": "2026-10-23T22:06:13+00:00"
}