ajtazer/heckit / skills/cve-hunting/sandbox-escape
sandbox-escape
VerifiedDetect VM/sandbox escape vulnerabilities in packages using node:vm, simpleeval, or custom sandboxes that can be bypassed to achieve code execution.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.8 KB |
| references/false-positive-indicators.md | markdown | 1.8 KB |
| references/poc-skeleton.md | markdown | 3.4 KB |
| references/sinks.md | markdown | 2.4 KB |
references/false-positive-indicators.md
View on GitHub# False Positive Indicators -- Sandbox Escape
## When Sandbox Escape is NOT Exploitable
### 1. Uses Genuinely Isolated Sandbox
The code uses a REAL security sandbox:
- `isolated-vm` -- separate V8 isolate, no prototype chain access
- `quickjs-emscripten` -- separate engine in WebAssembly
- WebAssembly module -- cannot access host memory or APIs
- OS-level sandbox (seccomp, AppArmor, Docker with no host mount)
### 2. Sandbox Used for Non-Security Purpose
The package documentation explicitly states vm is NOT used for security:
- Used for module loading/compilation (like Node.js require internals)
- Used for context isolation in testing frameworks
- Used for server-side rendering where the code is trusted
### 3. Input is Trusted
Only admin/developer code runs in the sandbox:
- Plugin system restricted to admin users
- Code comes from package dependencies (trusted)
- Template compilation with developer-authored templates only
### 4. AST Allowlisting Before Execution
The code parses the input into an AST and validates against an allowlist before execution:
```js
const ast = acorn.parse(code);
// Walk AST, reject any node type not in allowlist
// Only then execute
```
This is much safer than regex-based filtering but check for completeness.
### 5. Python ast.literal_eval
`ast.literal_eval()` only evaluates Python literals. It cannot execute functions, access attributes, or import modules. It is SAFE by design.
### 6. vm2 with Specific Patches
vm2 >= 3.9.19 with all known escape patches applied. However, the library is DEPRECATED and no new patches will be released. Risk increases over time.
### 7. Read-Only Sandbox
The sandbox only evaluates expressions and returns values. No side effects possible. Even if the attacker can read `process.env`, no write access means limited impact (information disclosure vs RCE).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |