happy-dom is vulnerable to Remote Code Execution (RCE)
98
Critical Risk
Affected versions of the package are vulnerable to Remote Code Execution (RCE). This vulnerability occurs when an attacker injects a server-side script into the src attribute of a <script> tag. Due to the usage of child_process.execFileSync() in happy-dom to perform synchronous fetch operations, an attacker can escape from the URL string, injecting arbitrary code. For example, an attacker could exploit this by using a payload like:document.write(script src="https://localhost:8080/'+require('child_process').execSync('id')+'">/script>); This would allow the attacker to execute arbitrary commands on the server, potentially compromising the system.
You are affected if you are using a version that falls within the vulnerable range.
happy-dom is vulnerable to Remote Code Execution (RCE) in versions 13.0.0 - 15.10.1.
Upgrade the happy-dom library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant