Vulnerabilities in pkg:npm/chownr

PACKAGE
Advisory Identifier: GHSA-c6rq-rjc2-86v2
Advisory Summary

CVE-2017-18869 is a LOW (CVSS 2.5) time-of-check time-of-use (toctou) race condition vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Chownr libraries in the npm ecosystem. The issue involves time-of-check time-of-use (toctou) race condition in chownr. Remediation is available by upgrading affected packages to version 1.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/chownr

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/chownr. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c6rq-rjc2-86v2 CVE-2017-18869 LOW Time-of-check Time-of-use (TOCTOU) Race Condition in chownr

CVE-2017-18869 at a Glance

CVE Identifier CVE-2017-18869
GHSA Identifier GHSA-c6rq-rjc2-86v2
Severity LOW
CVSS v3.1 Base Score 2.5
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Chownr
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 2.5

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

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

How to Fix CVE-2017-18869

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

chownr fixed: 1.1.0
npm install chownr@1.1.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 chownr

How to Check if You Are Affected

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

npm ls chownr

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

Note: The npm ls chownr 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-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Chownr, 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

A TOCTOU issue in the chownr package before 1.1.0 for Node.js 10.10 could allow a local attacker to trick it into descending into unintended directories via symlink attacks.

CVE-2017-18869 Affected Chownr Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
chownr
npm
< 1.1.0
1.1.0

References

Frequently Asked Questions

What is CVE-2017-18869?
CVE-2017-18869 is a security vulnerability in Chownr involving Time-of-check Time-of-use (TOCTOU) Race Condition in chownr under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Chownr versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: chownr.
What version fixes CVE-2017-18869?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is chownr affected?
Yes, chownr is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2017-18869?
CVE-2017-18869 has a CVSS v3.1 base score of 2.5 (LOW) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2017-18869?
CVE-2017-18869 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check npm dependencies for CVE-2017-18869?
Run the dependency tree command: 'npm ls chownr'. 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-c6rq-rjc2-86v2",
  "modified" : "2021-05-12T20:23:29Z",
  "published" : "2022-02-10T23:33:39Z",
  "aliases" : [ "CVE-2017-18869" ],
  "summary" : "Time-of-check Time-of-use (TOCTOU) Race Condition in chownr",
  "details" : "A TOCTOU issue in the chownr package before 1.1.0 for Node.js 10.10 could allow a local attacker to trick it into descending into unintended directories via symlink attacks.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "chownr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-18869"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/isaacs/chownr/issues/14"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/isaacs/chownr/commit/36a93e3f0a220062c47b237cf6ab6d5f55cd79c9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/isaacs/chownr/commit/a631d841022880e5c8d694408a7e96d6d576d0ce"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863985"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1611614"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/npm:chownr:20180731"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-12T20:23:29Z",
    "nvd_published_at" : "2020-06-15T15:15:00Z"
  }
}