Command Injection Affecting browserstack-cypress-cli package, versions >=1.22.0 <1.36.6


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.53% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-BROWSERSTACKCYPRESSCLI-17400157
  • published22 Jun 2026
  • disclosed16 Jun 2026
  • creditamine123ait

Introduced: 16 Jun 2026

NewCVE-2026-48723  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade browserstack-cypress-cli to version 1.36.6 or higher.

Overview

browserstack-cypress-cli is a BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.

Affected versions of this package are vulnerable to Command Injection via the loadJsFile() process in readCypressConfigUtil. An attacker can execute arbitrary commands by supplying a crafted cypress_config_filepaththat is interpolated into theexecSync()` command string. This lets a malicious config path break out of the intended Node invocation and run attacker-controlled shell commands on the host that loads the Cypress config, leading to remote code execution and compromise of the affected machine or build environment.

Notes

  • The attack surface spans both Unix-like shells and Windows command processing, since the pre-fix code used a shell command string on each platform with different NODE_PATH handling.

Workarounds

  • Restrict browserstack.json so only trusted users can set or edit run_settings.cypress_config_file; this blocks attackers from supplying a crafted path that injects shell commands when the CLI loads the Cypress config.
  • Avoid running npx browserstack-cypress-cli run on untrusted repositories or cloned codebases with attacker-controlled browserstack.json; this prevents malicious cypress_config_file values from being processed on your machine or CI runner.

CVSS Base Scores

version 4.0
version 3.1