Sandbox Breakout / Arbitrary Code Execution in lighter-vm

lighter-vm Updated 02 Oct 2025

Summary

04/09/2020
CRITICAL
No i
Critical
Not published

GHSA-c3hq-7mxh-mqxf: Sandbox Breakout / Arbitrary Code Execution in lighter-vm. Affects lighter-vm versions >= 0.0.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The lighter-vm package is an npm package used for sandboxing JavaScript code execution. It provides a secure environment for running untrusted code by restricting access to certain resources and APIs. However, all versions of lighter-vm are vulnerable to a Sandbox Escape vulnerability, which can lead to Remote Code Execution. This vulnerability allows attackers to bypass the sandbox restrictions and execute arbitrary code in the system.

Vulnerability Detail

The vulnerability in lighter-vm arises from the package's failure to properly restrict access to the main context through this.constructor.constructor. By exploiting this flaw, an attacker can execute arbitrary code within the system. For example, evaluating the payload this.constructor.constructor('return process.env')() would print the contents of the process.env object, potentially exposing sensitive information. This vulnerability poses a significant risk as it allows an attacker to execute malicious code and potentially gain unauthorized access to the system.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no fix available, a possible workaround is to implement additional security measures in the application that utilizes lighter-vm. This may include implementing strict input validation, sanitization of user-supplied code, and enforcing strong access controls to limit the impact of any potential code execution.

Conclusion

The lighter-vm package is vulnerable to a Sandbox Escape vulnerability, which can lead to Remote Code Execution. Currently, there is no fix available, and it is recommended to consider using an alternative package until a fix is made available. Implementing additional security measures in the application can help mitigate the risk of this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for lighter-vm →

Share this vulnerability

FAQ

lighter-vm is an npm package used for sandboxing JavaScript code execution. It provides a secure environment for running untrusted code by restricting access to certain resources and APIs.

A Sandbox Escape vulnerability allows an attacker to break out of the restricted environment provided by a sandbox and execute arbitrary code with elevated privileges.

The vulnerability in lighter-vm can lead to Remote Code Execution, allowing an attacker to execute arbitrary code within the system. This can result in unauthorized access, data breaches, and potential compromise of the entire system.

Currently, there is no fix available for this vulnerability in lighter-vm. It is recommended to consider using an alternative package until a fix is made available.

To mitigate the risk of this vulnerability, it is recommended to implement additional security measures in the application that utilizes lighter-vm. This may include strict input validation, sanitization of user-supplied code, and enforcing strong access controls.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback