CVE-2024-51757
JavaScript vulnerability analysis and mitigation

Overview

CVE-2024-51757 affects happy-dom, a JavaScript implementation of a web browser without its graphical user interface. The vulnerability was discovered and disclosed on November 6, 2024, affecting versions prior to 15.10.2. The vulnerability allows for arbitrary code execution on the host system via a script tag, which executes code in the user context of happy-dom (NVD, GitHub Advisory).

Technical details

The vulnerability stems from insufficient input validation in the handling of script tags. Specifically, it was possible to inject server-side scripts into the 'src' attribute of a script tag. Since happy-dom uses child_process.execFileSync() to perform synchronous fetches, attackers could escape from the URL string to execute arbitrary commands. The vulnerability has been assigned a CVSS v4.0 score of 9.3 (CRITICAL) with the vector string CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N (NVD).

Impact

When exploited, this vulnerability allows attackers to execute arbitrary code in the user context of happy-dom on the host system. This could potentially lead to unauthorized access, data breaches, or system compromise depending on the context in which happy-dom is being used (GitHub Advisory).

Mitigation and workarounds

Users are advised to upgrade to version 15.10.2 which contains the security fix. The patch prevents code injection by properly handling URL strings in script tags. There are no known workarounds for this vulnerability other than upgrading to the patched version (GitHub Release).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-56515HIGH8.8
  • JavaScriptJavaScript
  • fiora
NoNoOct 01, 2025
CVE-2025-61668HIGH8.7
  • JavaScriptJavaScript
  • @plone/volto
NoYesOct 02, 2025
CVE-2025-53967HIGH7.5
  • JavaScriptJavaScript
  • figma-developer-mcp
NoYesSep 30, 2025
CVE-2025-56572HIGH7.5
  • JavaScriptJavaScript
  • financejs
NoNoSep 30, 2025
CVE-2025-56514LOW2
  • JavaScriptJavaScript
  • fiora
NoNoOct 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management