Code Injection in Happy DOM - CVE-2026-115895
Published: November 12, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code with the privileges of the Happy DOM host process.
The vulnerability exists due to improper control of code generation in the Happy DOM ESM compiler when unvalidated import aliases are interpolated into JavaScript with JavaScript evaluation enabled. A remote attacker can induce a victim to process module source containing a malicious import alias and with { type: 'json' } to execute a destructuring default initializer that accesses Node.js host APIs, enabling file access, environment disclosure, and operating-system command execution.