Vulnerability library
Security checkMarch 30, 2026

Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmhappy-dom

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the happy-dom package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 15.10.0, <= 20.8.7
  • Patched version(s): 20.8.8

References

Could your website be exposed too?

SmartScanner can check your website for Happy DOM ECMAScriptModuleCompiler: unsanitized export names are interpolated as executable code and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 30, 2026