{
  "id": "CVE-2026-33943",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-33943",
  "published_at": "2026-03-27T21:15:19.186Z",
  "title": "Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code",
  "vendor": "capricorn86",
  "product": "happy-dom",
  "cvss": {
    "score": 9.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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.",
  "cwe": "CWE-94",
  "cpes": [
    "cpe:2.3:a:capricorn86:happy_dom:*:*:*:*:*:node.js:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.8,
    "nvd": 9.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "capricorn86",
        "product": "happy-dom",
        "ranges": [
          "\u003e= 15.10.0, \u003c 20.8.8"
        ],
        "fixed_in": [
          "20.8.8"
        ]
      }
    ],
    "upgrade": [
      "Upgrade happy-dom to 20.8.8 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/capricorn86/happy-dom/security/advisories/GHSA-6q6h-j7hj-3r64"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/capricorn86/happy-dom/commit/5437fdf8f13adb9590f9f52616d9f69c3ee8db3c"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/capricorn86/happy-dom/releases/tag/v20.8.8"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
