Command Injection Affecting browserstack-local package, versions >=1.5.0 <1.5.9


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.07% (22nd 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-BROWSERSTACKLOCAL-15149317
  • published30 Jan 2026
  • disclosed28 Jan 2026
  • creditJunming Wu

Introduced: 28 Jan 2026

CVE-2025-57283  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade browserstack-local to version 1.5.9 or higher.

Overview

browserstack-local is a Nodejs bindings for BrowserStack Local

Affected versions of this package are vulnerable to Command Injection via the logfile variable in lib/Local.js. An attacker can execute arbitrary operating system commands by supplying crafted input to this variable. This is only exploitable if the attacker has the ability to set the logfile variable, which typically requires prior access to configuration files or the environment and permission to modify it.

Workaround

This vulnerability can be mitigated by implementing strict input validation of the logfile variable using an allow-list approach, permitting only alphanumeric characters, dots, dashes, underscores, and forward slashes, and rejecting any input containing other characters.

CVSS Base Scores

version 4.0
version 3.1