Vulnerabilities in pkg:npm/browserstack-local

PACKAGE
Advisory Identifier: GHSA-g4w6-c99w-4wh7
Advisory Summary

CVE-2025-57283 is a MODERATE browserstack local vulnerable to command vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Browserstack local libraries in the npm ecosystem. The issue involves browserstack local vulnerable to command injection through logfile variable. Remediation is available by upgrading affected packages to version 1.5.9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/browserstack-local

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/browserstack-local. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g4w6-c99w-4wh7 CVE-2025-57283 MODERATE BrowserStack Local vulnerable to Command Injection through logfile variable

CVE-2025-57283 at a Glance

CVE Identifier CVE-2025-57283
GHSA Identifier GHSA-g4w6-c99w-4wh7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Browserstack local
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-57283

To remediate this vulnerability, upgrade all affected Browserstack local dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

browserstack-local fixed: 1.5.9
npm install browserstack-local@1.5.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls browserstack-local

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-57283, inspect your project dependencies using npm:

npm ls browserstack-local

Analyze the terminal output to locate any version of Browserstack local in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.9), your application is affected.

Note: The npm ls browserstack-local command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Browserstack local, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The Node.js package browserstack-local 1.5.8 contains a command injection vulnerability. This occurs because the logfile variable is not properly sanitized in lib/Local.js.

CVE-2025-57283 Affected Browserstack local Versions

1 component(s)
Fixed Versions:
1.5.9
Product / Package Ecosystem Affected Versions Fixed Version
browserstack-local
npm
< 1.5.9
1.5.9

References

Frequently Asked Questions

What is CVE-2025-57283?
CVE-2025-57283 is a security vulnerability in Browserstack local involving BrowserStack Local vulnerable to Command Injection through logfile variable under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Browserstack local versions are affected?
Affected versions include releases prior to 1.5.9 across affected packages: browserstack-local.
What version fixes CVE-2025-57283?
Upgrading to 1.5.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is browserstack-local affected?
Yes, browserstack-local is affected in releases prior to 1.5.9. Upgrade your dependency to 1.5.9 or later.
What CWE is associated with CVE-2025-57283?
CVE-2025-57283 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2025-57283?
Run the dependency tree command: 'npm ls browserstack-local'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g4w6-c99w-4wh7",
  "modified" : "2026-02-27T16:40:19Z",
  "published" : "2026-01-28T18:30:47Z",
  "aliases" : [ "CVE-2025-57283" ],
  "summary" : "BrowserStack Local vulnerable to Command Injection through logfile variable",
  "details" : "The Node.js package browserstack-local 1.5.8 contains a command injection vulnerability. This occurs because the logfile variable is not properly sanitized in lib/Local.js.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "browserstack-local"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.5.8"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57283"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/browserstack/browserstack-local-nodejs/issues/168"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/Dremig/b639c61541dd1482007dc7a5cd7fefb1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/browserstack/browserstack-local-nodejs"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-29T15:46:52Z",
    "nvd_published_at" : "2026-01-28T16:16:12Z"
  }
}