Sploitus

Exploit for V8-sandbox-escape-PoC-

githubexploit Β· 2026-08-24

Exploit Code

README177 lines
## https://sploitus.com/exploit?id=E26D5E16-C41B-5153-A8A7-8438E159B569
# V8 Sandbox Escape PoC

> ⚠️ **CRITICAL SECURITY WARNING** ⚠️  
> This repository contains a proof-of-concept for a potential V8 sandbox escape vulnerability. This is **PRIVATE RESEARCH** intended exclusively for responsible disclosure to Google VRP.

## β›” Disclaimer

**DO NOT:**
- Execute this PoC against production systems, services, or third-party infrastructure
- Redistribute or share this code publicly
- Test against products or services without explicit authorization
- Use for malicious purposes

This research is provided for vulnerability disclosure and defensive analysis only.

---

## Overview

This repository contains a proof-of-concept demonstrating a potential V8 sandbox escape vulnerability through corruption of WebAssembly internal metadata. The exploit uses APIs available exclusively in the `d8` shell with `--sandbox-testing` flag and ultimately constructs 64-bit memory read and write primitives within V8.

### Affected Component
- **Target:** V8 JavaScript engine, specifically WebAssembly and V8 sandbox
- **Environment:** `d8` shell with `--sandbox-testing` flag
- **Repository Commit Reference:** `1bb28860cbca49445756ca32ee188fdc4bd065df`
- **Status:** Under investigation by Google VRP

---

## Technical Details

### Vulnerability Summary

The PoC exploits WebAssembly table manipulation and internal V8 memory metadata to:

1. **Access internal structures** via `Sandbox.MemoryView` and helper functions
2. **Manipulate WebAssembly tables** using `TrustedDispatchTable` handles
3. **Trigger memory reuse** by forcing table growth and reclamation of freed entries
4. **Corrupt `CanonicalSig` representation** in reused WebAssembly entries
5. **Build 64-bit read/write primitives** (`read64`, `write64`) for arbitrary memory access

### Attack Flow

| Phase | Description |
|-------|-------------|
| **Setup** | Create memory views and helper functions using `Sandbox.getAddressOf` and `Sandbox.getObjectAt` |
| **Table Manipulation** | Read WebAssembly table internal fields and calculate handle offsets |
| **Memory Trigger** | Substitute a table handle and force growth to provoke use-after-free |
| **Reclamation** | Reclaim freed entries with compatible WebAssembly functions |
| **Exploitation** | Modify internal representations to build `read64`/`write64` primitives |

### Impact

If reproducible on an affected build, an attacker could:
- **Bypass sandbox guarantees** and read/write memory outside normal JavaScript/WebAssembly object boundaries
- **Corrupt memory structures** and modify trusted data
- **Escalate privileges** within the embedding process
- Potentially achieve **remote code execution** depending on additional mitigations

**Severity:** Depends on V8 version, mitigation effectiveness, and product context.

---

## Files

| File | Purpose |
|------|---------|
| `poc.js` | Main proof-of-concept exploit code (~2600 lines) |
| `Dockerfile` | Container setup for isolated testing environment |
| `SECURITY_REPORT.md` | Detailed security report (Spanish) |
| `SECURITY_REPORT.zip` | Compressed security documentation |

---

## Requirements

### For Testing (Controlled Environment)

- **Docker** (recommended for isolation)
- **V8 d8 binary** built with support for:
  - `--sandbox-testing` flag
  - WebAssembly (WASM) enabled
  - Debug information

### Environment Setup

```bash
# Build container with d8
docker build --build-arg D8_TARBALL_URL="" -t v8-poc .

# Run in isolated environment
docker run --rm -v $(pwd):/work v8-poc

# Inside container: execute PoC
d8 --sandbox-testing /work/poc.js
```

---

## Responsible Disclosure

### Process

1. **Report submitted to:** Google Vulnerability Reward Program (VRP)
2. **Submission method:** Official Google VRP portal
3. **Artifacts:** Kept private during investigation
4. **Authorization:** Awaiting confirmation before public disclosure

### Required Information for Reproduction

When reporting or testing, provide:
- βœ… Exact V8/d8 version and operating system
- βœ… SHA-256 hash of test artifacts
- βœ… Console output and crash logs from disposable test environment
- βœ… Confirmation of successful read/write outside sandbox or crash
- βœ… Any mitigations or build flags that affect reproducibility
- ❌ NO production data, user secrets, or tests against live services

---

## Status

| Phase | Status |
|-------|--------|
| Static code analysis | βœ… Complete |
| Independent execution | ⏳ Pending |
| Affected version confirmation | ⏳ Pending |
| Google product impact confirmation | ⏳ Pending |
| CVE/upstream issue | ⏳ Pending |

---

## References

### Related V8 Components
- WebAssembly Table Management
- V8 Sandbox Implementation
- Internal Metadata Structures
- Memory Protection Mechanisms

### External Resources
- [V8 Project](https://v8.dev/)
- [Google VRP](https://www.google.com/about/appsecurity/reward-program/)
- [WebAssembly Specification](https://webassembly.org/)

---

## Contributors

- **Researcher:** nek-3231
- **Status:** Active investigation

---

## License

This repository does not include a license. Use is restricted to authorized security research and responsible disclosure to Google.

---

## Contact & Reporting

**For Google VRP team:**
- Use official Google VRP portal for submission
- Keep all artifacts private
- Allow time for investigation and response

**For security researchers:**
- Do NOT fork, clone, or distribute publicly
- Do NOT test against any systems without explicit authorization
- Coordinate with Google VRP if you have related findings

---

**Last Updated:** 2026-08-24  
**Sensitivity:** πŸ”’ CONFIDENTIAL - SECURITY RESEARCH