CVE-2016-1000021: Duplicate Advisory Node CLI Allows Arbitrary File Vulnerability

LOW
Advisory Identifier: GHSA-3mrp-qhcj-mwv5
CVSS 3.5
CWE-22
Published
Advisory Summary

CVE-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.

CVE-2016-1000021 at a Glance

CVE Identifier CVE-2016-1000021
GHSA Identifier GHSA-3mrp-qhcj-mwv5
Severity LOW
CVSS v3.1 Base Score 3.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Duplicate Advisory
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

cli fixed: 1.0.0
npm install cli@1.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 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

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-6cpc-mj5c-m9rq. This link is maintained to preserve external references. ## Original Description An 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.

CVE-2016-1000021 Affected Duplicate Advisory Versions

1 component(s)
Fixed Versions:
1.0.0
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?
CVE-2016-1000021 is a security vulnerability in Duplicate Advisory involving Node CLI Allows Arbitrary File Overwrite under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Duplicate Advisory versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: cli.
What version fixes CVE-2016-1000021?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cli affected?
Yes, cli is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What is the CVSS score of CVE-2016-1000021?
CVE-2016-1000021 has a CVSS v3.1 base score of 3.5 (LOW) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2016-1000021?
CVE-2016-1000021 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check npm dependencies for CVE-2016-1000021?
Run the dependency tree command: 'npm ls cli'. 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-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"
  }
}