Vulnerabilities in pkg:npm/cli
PACKAGECVE-2016-1000021 is a LOW (CVSS 3.5) node cli allows arbitrary file vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Duplicate Advisory libraries in the npm ecosystem. The issue involves node cli allows arbitrary file overwrite. Remediation is available by upgrading affected packages to version 1.0.0.
pkg:npm/cli
Vulnerability advisories affecting package pkg:npm/cli. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3mrp-qhcj-mwv5 | CVE-2016-1000021 | LOW | Duplicate Advisory: Node CLI Allows Arbitrary File Overwrite |
| GHSA-6cpc-mj5c-m9rq | CVE-2016-10538 | LOW | Arbitrary File Write in cli |
CVE-2016-1000021 at a Glance
Security Impact
CVSS: 3.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2016-1000021
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 cli@1.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls cli
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2016-1000021, inspect your project dependencies using npm:
npm ls cli
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.0), your application is affected.
Note: The npm ls cli 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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-2016-1000021 Affected Duplicate Advisory Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cli
|
npm |
≥ 0.1.0
< 1.0.0
|
1.0.0
|
References
Frequently Asked Questions
What is CVE-2016-1000021?
Which Duplicate Advisory versions are affected?
What version fixes CVE-2016-1000021?
Is cli affected?
What is the CVSS score of CVE-2016-1000021?
What CWE is associated with CVE-2016-1000021?
How can I check npm dependencies for CVE-2016-1000021?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3mrp-qhcj-mwv5",
"modified" : "2023-12-08T21:57:37Z",
"published" : "2022-05-24T17:02:32Z",
"withdrawn" : "2023-12-08T21:57:37Z",
"aliases" : [ "CVE-2016-1000021" ],
"summary" : "Duplicate Advisory: Node CLI Allows Arbitrary File Overwrite",
"details" : "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-6cpc-mj5c-m9rq. This link is maintained to preserve external references.\n\n## Original Description\nAn issue exists in node-cli 0.1.0 through 0.11.3 due to predictable temporary file names in lock_file and log_file, which allows an attacker to overwrite files.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.1.0"
}, {
"fixed" : "1.0.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.11.3"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-1000021"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10538"
}, {
"type" : "WEB",
"url" : "https://github.com/node-js-libs/cli/issues/81"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-1000021"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20190430172230/https://www.npmjs.com/advisories/95"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-28T18:34:12Z",
"nvd_published_at" : "2019-12-03T22:15:00Z"
}
}