GHSA-w725-67p7-xv22: Local devices Command Injection Vulnerability

HIGH
CWE-77
Published
Advisory Summary

GHSA-w725-67p7-xv22 is a HIGH command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Local devices libraries in the npm ecosystem. The issue involves command injection in local-devices. Remediation is available by upgrading affected packages to version 3.0.0.

GHSA-w725-67p7-xv22 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-w725-67p7-xv22
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Local devices
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-w725-67p7-xv22

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

local-devices fixed: 3.0.0
npm install local-devices@3.0.0
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 local-devices

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-w725-67p7-xv22, inspect your project dependencies using npm:

npm ls local-devices

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

Note: The npm ls local-devices 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 Local devices, 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

Versions of `local-devices` prior to 3.0.0 are vulnerable to Command Injection. The package does not validate input on ip addresses and concatenates it to an exec call, allowing attackers to run arbitrary commands in the system. ## Recommendation Upgrade to version 3.0.0 or later.

GHSA-w725-67p7-xv22 Affected Local devices Versions

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

References

Frequently Asked Questions

What is GHSA-w725-67p7-xv22?
GHSA-w725-67p7-xv22 is a security vulnerability in Local devices involving Command Injection in local-devices under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Local devices versions are affected?
Affected versions include releases prior to 3.0.0 across affected packages: local-devices.
What version fixes GHSA-w725-67p7-xv22?
Upgrading to 3.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is local-devices affected?
Yes, local-devices is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
What CWE is associated with GHSA-w725-67p7-xv22?
GHSA-w725-67p7-xv22 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 GHSA-w725-67p7-xv22?
Run the dependency tree command: 'npm ls local-devices'. 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-w725-67p7-xv22",
  "modified" : "2021-09-28T17:35:44Z",
  "published" : "2020-09-03T17:05:04Z",
  "aliases" : [ ],
  "summary" : "Command Injection in local-devices",
  "details" : "Versions of `local-devices` prior to 3.0.0 are vulnerable to Command Injection. The package does not validate input on ip addresses and concatenates it to an exec call, allowing attackers to run arbitrary commands in the system.\n\n\n## Recommendation\n\nUpgrade to version 3.0.0 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "local-devices"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/DylanPiercey/local-devices/pull/16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/DylanPiercey/local-devices/commit/57b9a933c9d23d34bd5a055536db824de66db553"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/DylanPiercey/local-devices"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1020"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:44:24Z",
    "nvd_published_at" : null
  }
}