nodesecurity-npm-utils@3.0.0

Vulnerabilities

1 via 1 paths

Dependencies

115

Source

npm

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
Status
  • 1
  • 0
  • 0

medium severity

Time of Check Time of Use (TOCTOU)

  • Vulnerable module: chownr
  • Introduced through: silent-npm-registry-client@1.0.0

Detailed paths

  • Introduced through: nodesecurity-npm-utils@3.0.0 silent-npm-registry-client@1.0.0 npm-registry-client@6.3.3 chownr@0.0.2
    Remediation: Upgrade to nodesecurity-npm-utils@3.2.0.

Overview

chownr is a package that takes the same arguments as fs.chown()

Affected versions of this package are vulnerable to Time of Check Time of Use (TOCTOU). Affected versions of this package are vulnerable toTime of Check Time of Use (TOCTOU) attacks.

It does not dereference symbolic links and changes the owner of the link, which can trick it into descending into unintended trees if a non-symlink is replaced by a symlink at a critical moment:

      fs.lstat(pathChild, function(er, stats) {
        if (er)
          return cb(er)
        if (!stats.isSymbolicLink())
          chownr(pathChild, uid, gid, then)

Remediation

Upgrade chownr to version 1.1.0 or higher.

References