CVE-2025-57283
JavaScript vulnerability analysis and mitigation

Overview

CVE-2025-57283 is a command injection vulnerability in the Node.js package browserstack-local version 1.5.8, caused by improper sanitization of the logfile variable in lib/Local.js. It was discovered by researcher "Dremig" and published on January 28, 2026. The vulnerability affects all versions of browserstack-local up to and including 1.5.8, with version 1.5.9 containing the fix. It carries a CVSS v3.1 base score of 7.8 (High) and a CVSS v4 score of 6.6 (Moderate) (GitHub Advisory, Feedly).

Technical details

The root cause is improper neutralization of special elements used in a command (CWE-77 / CWE-94), where the logfile property accepted by the browserstack-local Node.js package is passed unsanitized into a shell command within lib/Local.js. An attacker who can control the logfile parameter — for example, by supplying a value such as 'test; touch Dremig486; #' — can inject arbitrary shell commands that execute when startSync() or equivalent methods are called. The attack requires low privileges and no user interaction, but is local in nature (the attacker must be able to influence the logfile value passed to the library). A public proof-of-concept gist demonstrating the injection was published by the discoverer (GitHub Gist PoC, GitHub Advisory).

Impact

Successful exploitation allows an attacker to execute arbitrary operating system commands with the privileges of the application running browserstack-local, resulting in high impact to confidentiality, integrity, and availability of the affected system. This could lead to unauthorized data access, file system manipulation, installation of malware, or lateral movement within the network if the compromised process has sufficient privileges (GitHub Advisory, Feedly).

Exploitability

A public proof-of-concept demonstrating the command injection via the logfile parameter was published by the discoverer "Dremig" on GitHub Gist (GitHub Gist PoC). As of the time of reporting, there is no evidence of active in-the-wild exploitation or threat actor attribution. The EPSS score is approximately 0.081% (24th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify vulnerable dependency: Confirm the target application uses browserstack-local version 1.5.8 or earlier (e.g., by inspecting package.json or node_modules).
  2. Gain influence over the logfile parameter: Identify a code path where the logfile property of the Local object can be set with attacker-controlled input — this may be via a configuration file, environment variable, API parameter, or direct code access.
  3. Craft the malicious payload: Set the logfile value to a string containing shell metacharacters to inject additional commands, for example:
    local.logfile = 'test; <malicious_command>; #';
  4. Trigger execution: Call local.startSync({}) or an equivalent method that causes lib/Local.js to construct and execute a shell command incorporating the unsanitized logfile value.
  5. Achieve arbitrary command execution: The injected command runs with the privileges of the Node.js process, enabling file creation, data exfiltration, reverse shell establishment, or further system compromise (GitHub Gist PoC, GitHub Advisory).

Indicators of compromise

  • Process: Unexpected child processes spawned by the Node.js process running browserstack-local (e.g., sh, bash, touch, curl, wget, python, or other system utilities not normally invoked by the application).
  • File System: Unexpected files created in the working directory of the application or in /tmp; new scripts, cron jobs, or SSH authorized keys added by the application's service account.
  • Logs: Application logs showing unusual logfile parameter values containing shell metacharacters (;, |, &, #, backticks); Node.js error logs referencing unexpected command execution in lib/Local.js.
  • Network: Unexpected outbound connections from the Node.js process to external IPs or domains, potentially indicating reverse shell or data exfiltration activity.

Mitigation and workarounds

Upgrade browserstack-local to version 1.5.9 or later, which patches the improper sanitization of the logfile variable in lib/Local.js (GitHub Advisory). As a workaround prior to patching, implement strict input validation on the logfile parameter to reject values containing shell metacharacters, and restrict the execution permissions of applications using this library. Network segmentation should also be considered to limit the blast radius of any successful exploitation (Feedly).

Community reactions

The vulnerability was shared by TheHackerWire on Mastodon (infosec.exchange) and Bluesky shortly after disclosure, indicating moderate community awareness (TheHackerWire Mastodon). No significant vendor statements or major media coverage beyond standard vulnerability aggregator reporting have been identified.

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-77415CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-77414CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-77413CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-63421HIGH7.5
  • JavaScript logoJavaScript
  • @keystone-6/core
NoYesAug 21, 2026
CVE-2026-53509MEDIUM5.7
  • JavaScript logoJavaScript
  • @aborruso/ckan-mcp-server
NoYesAug 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management