patriksimek/vm2

Advanced vm/sandbox for Node.js

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 14 minutes ago
Added to GitGenius on September 16th, 2026
Created on January 14th, 2014
Open Issues & Pull Requests: 13 (+0)
GitHub issues: Enabled
Number of forks: 329
Total Stargazers: 4,101 (+0)
Total Subscribers: 43 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 16.9 days
Mean response time: 266.0 days
90th percentile: 1153.6 days
Tracked items: 34

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 2
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 929 days
Stale 30+ days: 2
Stale 90+ days: 2

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (5)
  • confirmed (4)
  • bug (3)
  • feature request (2)
  • help wanted (2)
  • wontfix (2)
  • enhancement (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

vm2 is a sandbox for Node.js that executes untrusted code in an isolated environment.

The tool addresses the security risk of running arbitrary code by creating a virtual machine context where scripts execute without access to the host system's resources, globals, or require mechanism. It works by wrapping Node.js's built-in vm module with additional isolation layers, preventing breakout attacks and limiting what sandboxed code can access. Developers can pass data into the sandbox and retrieve results, controlling exactly what the isolated code sees and can do.

Teams should adopt vm2 when they need to safely execute user-supplied scripts, plugin code, or third-party logic without trusting it. This suits applications that accept code uploads, run user-defined transformations, or need to evaluate expressions from untrusted sources. The tool is particularly valuable in multi-tenant systems where one user's code must not interfere with another's or with the host application. It is not a replacement for process-level isolation in high-security scenarios, but rather a lightweight sandboxing layer for moderate threat models where full containerization is impractical.

The project shows consistent maintenance with regular updates addressing reported issues and security concerns. Development activity demonstrates responsiveness to bug reports and pull requests, with fixes applied to address sandbox escape vectors and edge cases. The maintainer engages with the community on security matters and incorporates improvements that strengthen isolation guarantees.