CVE-2017-1000451: Fs git Fs-git Command Injection Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-wp3j-gv53-4pg8
CVSS 7.8
CWE-78
Published
Advisory Summary

CVE-2017-1000451 is a HIGH (CVSS 7.8) fs-git command injection vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Fs git libraries in the npm ecosystem. The issue involves fs-git command injection vulnerability. Remediation is available by upgrading affected packages to version 1.0.2.

CVE-2017-1000451 at a Glance

CVE Identifier CVE-2017-1000451
GHSA Identifier GHSA-wp3j-gv53-4pg8
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Fs git
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2017-1000451

To remediate this vulnerability, upgrade all affected Fs git 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-git fixed: 1.0.2
npm install fs-git@1.0.2
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-git

How to Check if You Are Affected

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

npm ls fs-git

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

Note: The npm ls fs-git 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Fs git, 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

fs-git is a file system like api for git repository. The fs-git version 1.0.1 module relies on child_process.exec, however, the buildCommand method used to construct exec strings does not properly sanitize data and is vulnerable to command injection across all methods that use it and call exec.

CVE-2017-1000451 Affected Fs git Versions

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

References

Frequently Asked Questions

What is CVE-2017-1000451?
CVE-2017-1000451 is a security vulnerability in Fs git involving fs-git command injection vulnerability under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Fs git versions are affected?
Affected versions include releases prior to 1.0.2 across affected packages: fs-git.
What version fixes CVE-2017-1000451?
Upgrading to 1.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fs-git affected?
Yes, fs-git is affected in releases prior to 1.0.2. Upgrade your dependency to 1.0.2 or later.
What is the CVSS score of CVE-2017-1000451?
CVE-2017-1000451 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-1000451?
CVE-2017-1000451 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2017-1000451?
Run the dependency tree command: 'npm ls fs-git'. 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-wp3j-gv53-4pg8",
  "modified" : "2023-07-31T22:09:51Z",
  "published" : "2022-05-13T01:41:14Z",
  "aliases" : [ "CVE-2017-1000451" ],
  "summary" : "fs-git command injection vulnerability",
  "details" : "fs-git is a file system like api for git repository. The fs-git version 1.0.1 module relies on child_process.exec, however, the buildCommand method used to construct exec strings does not properly sanitize data and is vulnerable to command injection across all methods that use it and call exec.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "fs-git"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000451"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vvakame/fs-git/commit/eb5f70efa5cfbff1ab299fa7daaa5de549243998"
  }, {
    "type" : "WEB",
    "url" : "https://nodesecurity.io/advisories/360"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-31T22:09:51Z",
    "nvd_published_at" : "2018-01-02T17:29:00Z"
  }
}