CVE-2026-115895: Happy DOM: Incomplete fix for CVE-2026-33943: unsanitized import alias leads to host code execution
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.
References
- github.com/advisories/GHSA-834v-8h66-3h79
- github.com/capricorn86/happy-dom/commit/fd163520b74d9fa146be91f7b4e4f46d6cccbe13
- github.com/capricorn86/happy-dom/pull/2537
- github.com/capricorn86/happy-dom/releases/tag/v21.0.4
- github.com/capricorn86/happy-dom/security/advisories/GHSA-834v-8h66-3h79
- nvd.nist.gov/vuln/detail/CVE-2026-115895
Code Behaviors & Features
Detect and mitigate CVE-2026-115895 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →