browserstack-cypress-cli
CVE-2026-48723
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSubmit PR with malicious browserstack.json
-
DeliveryCI checks out attacker-controlled config
-
ExploitDeveloper or runner invokes browserstack-cypress
-
InstallloadJsFile interpolates path into execSync
-
C2Shell parses injected `;`/`&`/backtick payload
-
ExecuteArbitrary commands run as CI user
-
ImpactExfiltrate BrowserStack and repo secrets
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to control the cypress_config_file / cypress_config_filepath value passed to browserstack-cypress-cli (typically via browserstack.json or a --config-file CLI argument), and a legitimate user or CI job must then invoke the CLI against that config (CVSS UI:R). No BrowserStack authentication or special privilege is needed on the attacker side (PR:N) because the injection happens entirely in the victim's local Node.js process before any remote call. The flaw is in the default code path of loadJsFile()/convertTsConfig() - no non-default feature flag is required - but the attack vector is local (AV:L): there is no network listener, so realistic delivery is via supply-chain channels such as a malicious PR modifying browserstack.json, a poisoned shared CI template, or a repo containing a crafted config file. Platform is not a limiter: separate POSIX ( |
| Impact | The CVSS 3.1 vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (7.8) reflects the realistic threat model: this is not network-exploitable - an attacker must supply or influence the cypress_config_file path that a CI runner or developer machine consumes (e.g., a malicious config in a PR, repo, or shared CI artifact), and the victim must then invoke the CLI (UI:R). When that happens, execution is fully reliable (AC:L) and gives full CIA impact in the CI/developer context, which often holds source-repo, cloud, and BrowserStack credentials - a strong supply-chain pivot. No EPSS or KEV data was supplied and no public exploit identified at time of analysis; however the fix commit and unit tests publicly demonstrate working payload shapes (e.g., |
| Exploit ScenarioDerived | An attacker submits a pull request to a repository that uses browserstack-cypress-cli in CI, setting |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 15, 2026
OS command injection in BrowserStack's browserstack-cypress-cli versions prior to 1.36.6 allows attackers who control the cypress_config_filepath value to execute arbitrary shell commands in the context of the user running the CLI. The vulnerable loadJsFile() function in readCypressConfigUtil.js interpolated the path into a shell command executed via child_process.execSync(), letting embedded quote and semicolon characters break out of the quoted argument. No public exploit identified at time of analysis, though the upstream commit and added negative tests effectively document the exact payload pattern.
RemediationAI
Upstream fix available (commit 6dbf8f93); upgrade to the patched release published by BrowserStack - the advisory GHSA-fh4c-mffm-8xhf lists 1.36.6, while the CVE record references 1.36.4, so confirm against https://github.com/browserstack/browserstack-cypress-cli/security/advisories/GHSA-fh4c-mffm-8xhf and pin to whichever the vendor publishes. Until upgrade, treat browserstack.json and any externally supplied cypress_config_file value as untrusted: reject paths containing ; " $ | & ( ) { } \ (matching the upstream regex /[;"$|&(){}\\]/) before invoking the CLI, and avoid running browserstack-cypress on configs sourced from untrusted PRs or shared artifacts. Side effects are minimal - legitimate config paths almost never contain those metacharacters, though paths with spaces remain valid since space is not in the deny set. Do not attempt to mitigate by quoting/escaping in shell wrappers; the underlying execSync still interprets metacharacters and the fix correctly switches to execFileSync to eliminate the shell entirely.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is a textbook CWE-78 (Improper Neutralization of Special Elements used in an OS Command) in a Node.js CLI distributed on npm. In bin/helpers/readCypressConfigUtil.js, the prior code built a command string with template literals - NODE_PATH="..." node "..." "${cypress_config_filepath}" on POSIX and a set NODE_PATH=...&& variant on Windows - and handed it to child_process.execSync, which always spawns a shell. Because the user-controlled cypress_config_filepath was only wrapped in double quotes with no escaping, characters like ", ;, &, |, backtick, and $() allow the attacker to terminate the quoted argument and append arbitrary shell syntax. The CPE cpe:2.3:a:browserstack:browserstack-cypress-cli:*:*:* covers all versions of the npm package up to the fix. The patch (commit 6dbf8f93) replaces execSync with execFileSync (which spawns node directly with no shell), passes NODE_PATH via the env option, and adds a defense-in-depth validateFilePath() that rejects any path containing ;"$|&(){}\`.
Know when Browserstack Cypress Cli gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Local CLI ingesting an attacker-supplied config file (AV:L, PR:N), reliable injection (AC:L), victim must run the CLI (UI:R), full RCE in user context gives C/I/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
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.
Executive ViewAI
BrowserStack's browserstack-cypress-cli versions prior to 1.36.6 contain a command injection vulnerability allowing arbitrary code execution on systems running the tool. Organizations using this product face direct risk to developer machines and CI/CD pipelines, requiring immediate remediation to prevent system compromise and potential supply chain attacks.
Apply vendor patch (upgrade to browserstack-cypress-cli version 1.36.6 or later).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB