GHSA-gc94-6w89-hpqr: Fs path Command Injection Vulnerability

HIGH
CWE-77
Published
Advisory Summary

GHSA-gc94-6w89-hpqr is a HIGH command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Fs path libraries in the npm ecosystem. The issue involves command injection in fs-path. Remediation is available by upgrading affected packages to version 0.0.25.

GHSA-gc94-6w89-hpqr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gc94-6w89-hpqr
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 Fs path
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-gc94-6w89-hpqr

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

fs-path fixed: 0.0.25
npm install fs-path@0.0.25
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 fs-path

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-gc94-6w89-hpqr, inspect your project dependencies using npm:

npm ls fs-path

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

Note: The npm ls fs-path 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 Fs path, 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

All versions of `fs-path` are vulnerable to command injection is unsanitized user input is passed in. ## Recommendation No fix is currently available for this vulnerability. It is our recommendation to not install or use this module until a fix is available.

GHSA-gc94-6w89-hpqr Affected Fs path Versions

1 component(s)
Fixed Versions:
0.0.25
Product / Package Ecosystem Affected Versions Fixed Version
fs-path
npm
< 0.0.25
0.0.25

References

Frequently Asked Questions

What is GHSA-gc94-6w89-hpqr?
GHSA-gc94-6w89-hpqr is a security vulnerability in Fs path involving Command Injection in fs-path under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Fs path versions are affected?
Affected versions include releases prior to 0.0.25 across affected packages: fs-path.
What version fixes GHSA-gc94-6w89-hpqr?
Upgrading to 0.0.25 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fs-path affected?
Yes, fs-path is affected in releases prior to 0.0.25. Upgrade your dependency to 0.0.25 or later.
What CWE is associated with GHSA-gc94-6w89-hpqr?
GHSA-gc94-6w89-hpqr 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-gc94-6w89-hpqr?
Run the dependency tree command: 'npm ls fs-path'. 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-gc94-6w89-hpqr",
  "modified" : "2021-09-16T20:59:56Z",
  "published" : "2019-06-12T16:37:07Z",
  "aliases" : [ ],
  "summary" : "Command Injection in fs-path",
  "details" : "All versions of `fs-path` are vulnerable to command injection is unsanitized user input is passed in.\n\n\n## Recommendation\n\nNo fix is currently available for this vulnerability. It is our recommendation to not install or use this module until a fix is available.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fs-path"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.25"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pillys/fs-path/pull/5"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/324491"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pillys/fs-path"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/661"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-06-12T16:34:26Z",
    "nvd_published_at" : null
  }
}