Vulnerabilities in pkg:npm/fs-git
PACKAGECVE-2017-16087 is a HIGH command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Duplicate Advisory libraries in the npm ecosystem. The issue involves command injection in fs-git. Remediation is available by upgrading affected packages to version 1.0.2.
pkg:npm/fs-git
Vulnerability advisories affecting package pkg:npm/fs-git. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-qr32-j4j6-3m7r | CVE-2017-16087 | HIGH | Duplicate Advisory: Command Injection in fs-git |
| GHSA-wp3j-gv53-4pg8 | CVE-2017-1000451 | HIGH | fs-git command injection vulnerability |
CVE-2017-16087 at a Glance
How to Fix CVE-2017-16087
To remediate this vulnerability, upgrade all affected Duplicate Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install fs-git@1.0.2
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-16087, inspect your project dependencies using npm:
npm ls fs-git
Analyze the terminal output to locate any version of Duplicate Advisory 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-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 Duplicate Advisory, 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
CVE-2017-16087 Affected Duplicate Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fs-git
|
npm |
< 1.0.2
|
1.0.2
|
References
Frequently Asked Questions
What is CVE-2017-16087?
Which Duplicate Advisory versions are affected?
What version fixes CVE-2017-16087?
Is fs-git affected?
What CWE is associated with CVE-2017-16087?
How can I check npm dependencies for CVE-2017-16087?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qr32-j4j6-3m7r",
"modified" : "2026-01-23T22:50:14Z",
"published" : "2019-05-29T20:23:00Z",
"withdrawn" : "2026-01-23T22:50:14Z",
"aliases" : [ "CVE-2017-16087" ],
"summary" : "Duplicate Advisory: Command Injection in fs-git",
"details" : "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-wp3j-gv53-4pg8. This link is maintained to preserve external references.\n\n## Original Description\nAffected versions of `fs-git` do not sanitize strings passed into the `buildCommand` method, resulting in arbitrary code execution.\n\n\n## Recommendation\n\nUpdate to version 1.0.2 or later.",
"severity" : [ ],
"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-16087"
}, {
"type" : "WEB",
"url" : "https://github.com/vvakame/fs-git/commit/eb5f70efa5cfbff1ab299fa7daaa5de549243998"
}, {
"type" : "WEB",
"url" : "https://github.com/vvakame/fs-git/commit/eb5f70efa5cfbff1ab299fa7daaa5de549243998#diff-13b5b151431c7e7a17f273559ed212d5"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/360"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2019-05-29T20:22:06Z",
"nvd_published_at" : null
}
}