Vulnerability library
Security checkNovember 27, 2025

happy-dom's `--disallow-code-generation-from-strings` is not sufficient for isolating untrusted JavaScript

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

The mitigation proposed in GHSA-37j7-fg3j-429f for disabling eval/Function when executing untrusted code in happy-dom does not suffice, since it still allows prototype pollution payloads.

Recommendation

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

  • Affected version(s): >= 19.0.0, < 20.0.2
  • Patched version(s): 20.0.2

References

Could your website be exposed too?

SmartScanner can check your website for happy-dom's `--disallow-code-generation-from-strings` is not sufficient for isolating untrusted JavaScript and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated November 27, 2025