Arbitrary Code Injection Affecting happy-dom package, versions <20.0.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-HAPPYDOM-13535083
  • published12 Oct 2025
  • disclosed10 Oct 2025
  • creditMas0nShi

Introduced: 10 Oct 2025

NewCVE-2025-61927  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade happy-dom to version 20.0.0 or higher.

Overview

happy-dom is a Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

Affected versions of this package are vulnerable to Arbitrary Code Injection due to default evaluation of code from strings. An attacker can execute arbitrary code on the host system by running untrusted JavaScript code that escapes the intended sandbox and gains access to process-level functionality. Additionally, if the process is executed with CommonJS, the attacker can get hold of the require() function to import modules.

References

CVSS Base Scores

version 4.0
version 3.1