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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| browserstack | browserstack-runner | ≤ 0.9.5 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | browserstack-runner | <= 0.9.5 | — | GHSA-6vr3-7wcx-v5g5 |
References
- GitHub Security Advisory (GHSA-6vr3-7wcx-v5g5) vendor-advisory
- https://www.vulncheck.com/advisories/browserstack-runner-unauthenticated-rce-via-log-http-handler third-party-advisory