CVE-2023-30547
JavaScript vulnerability analysis and mitigation

Overview

CVE-2023-30547 is a critical security vulnerability discovered in the vm2 JavaScript sandbox module, affecting versions up to 3.9.16. The vulnerability was reported on April 17, 2023, by researchers from KAIST WSP Lab and received a CVSS score of 9.8. vm2 is a popular sandbox module used to run untrusted code with whitelisted Node's built-in modules, with approximately four million weekly downloads and integration into 721 packages (Security Online).

Technical details

The vulnerability exists in the exception sanitization process of vm2. When host exceptions may leak host objects into the sandbox, code is preprocessed with the transformer() function to instrument the code with handleException() sanitizer function calls. For CatchClause with ObjectPattern, the code calls handleException() and then re-throws the sanitized exception inside a nested try-catch. The handleException() function is an alias of thisEnsureThis(), which calls thisReflectGetPrototypeOf(other) to access the object's prototype. However, this may be proxied through a getPrototypeOf() proxy handler, which can itself throw an unsanitized host exception, resulting in the outer catch statement receiving it (GitHub PoC).

Impact

The vulnerability allows attackers to raise an unsanitized host exception inside handleException() which can be used to escape the sandbox and run arbitrary code in host context. This can lead to Remote Code Execution, assuming the attacker has arbitrary code execution primitive inside the context of the vm2 sandbox (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in version 3.9.17 of vm2. There are no known workarounds for this vulnerability, and users are strongly advised to upgrade to the patched version immediately (GitHub Advisory).

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-55182CRITICAL10
  • JavaScriptJavaScript
  • react-server-dom-turbopack
NoYesDec 03, 2025
CVE-2025-66032HIGH8.7
  • JavaScriptJavaScript
  • @anthropic-ai/claude-code
NoYesDec 03, 2025
CVE-2025-66412HIGH8.5
  • JavaScriptJavaScript
  • @angular/compiler
NoYesDec 01, 2025
CVE-2025-66415MEDIUM6.9
  • JavaScriptJavaScript
  • @fastify/reply-from
NoYesDec 01, 2025
CVE-2025-66404MEDIUM6.4
  • JavaScriptJavaScript
  • mcp-server-kubernetes
NoYesDec 03, 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