CVE-2026-48723: BrowserStack Cypress CL: Command Injection via cypress_config_file leads to arbitrary code execution through malicious browserstack.json
The browserstack-cypress-cli is BrowserStack's CLI which allows users to run Cypress tests on BrowserStack. Versions prior to 1.36.4 are vulnerable to OS command injection via the cypress_config_file configuration parameter. In readCypressConfigUtil.js, the loadJsFile() function constructs a shell command by interpolating the user-controlled cypress_config_filepath value into a template literal, then executes it via child_process.execSync(). Shell metacharacters in the config path (specifically " and ;) allow breaking out of the quoted argument and injecting arbitrary commands. This issue has been fixed in version 1.36.6.
Metrics
- CVSS v3.1
- 7.8
- Severity
- HIGH
- Fixed in
- —
- Affected Products
- 1
HarborGuard Analysis
Synopsis
Command injection in the BrowserStack Cypress CLI (browserstack-cypress-cli) allows an attacker to execute arbitrary operating system commands by supplying a malicious cypress_config_file path containing shell metacharacters. The vulnerability is reached locally and requires no authentication, but does require the victim to open or process a crafted browserstack.json file. Successful exploitation gives the attacker full control over confidentiality, integrity, and availability on the host running the CLI. HarborGuard tracks this advisory and will make a patched-image rebuild available the moment an upstream fix is confirmed published.
HarborGuard Coverage
Detection is available across every HarborGuard environment: the CVE is ingested from upstream feeds within minutes of publication and matched against customer images, including custom-built images that bundle the browserstack-cypress-cli package. Any image found carrying a vulnerable version is flagged immediately in the customer registry and CI pipeline scan results.
AvailableHarborGuard scores this finding at CVSS 7.8 HIGH and applies per-environment compliance policy weighting to determine urgency and routing. Findings are surfaced to the appropriate team inbox within each customer organization based on configured ownership and policy rules.
AvailableBecause no upstream fix version has been confirmed published at this time, HarborGuard re-checks the advisory on every ingest cycle and will make a patched-image rebuild available automatically the moment an upstream release closes the vulnerability. For customers who opt into auto-remediation, the rebuild, regression run, and PR against affected workloads will be triggered without manual intervention once a fix ships.
Pending upstreamExploit Conditions
- Network reachabilityNot required
The attacker needs an existing shell or process on the host; no network path to the service is required.
- AuthenticationNot required
No account or credential is needed to deliver the malicious config file.
- Victim interactionRequired
A developer or CI process must open or execute the CLI against a crafted browserstack.json containing a poisoned cypress_config_file path.
- Attack complexityDetail
The exploit is reliable and condition-free once the victim processes the malicious file; no race conditions or special memory layout is required.
Blast Radius
- Reads any files accessible to the user running the CLI, including environment variables, secrets, and SSH keys stored on the CI runner or developer workstation.
- Writes or overwrites files on the host, allowing the attacker to plant backdoors or corrupt build artifacts.
- Executes arbitrary processes under the identity of the CLI user, enabling lateral movement within the CI environment or exfiltration to attacker-controlled infrastructure.
- Crashes or disrupts the CI pipeline by terminating processes or corrupting the working directory.
How HarborGuard Handles This
Available on HarborGuard: continuous monitoring of the upstream advisory for CVE-2026-48723 on every ingest cycle, so a patched-image rebuild becomes available the moment BrowserStack publishes a confirmed fix release. Until a fix ships, customers can apply compensating controls by enforcing network-policy isolation on CI runner containers to limit outbound egress, using read-only filesystem mounts where the CLI operates, and gating the browserstack-cypress-cli execution behind a strict allowlist of config file paths validated before invocation. Where compliance policy permits, auto-remediation will automatically trigger a rebuild, regression run, and PR against affected workloads as soon as an upstream version closes this injection path.
- browserstack / browserstack-cypress-cli< 1.36.6
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H