org.webjars.npm:chownr@1.0.1 vulnerabilities

  • latest version

    2.0.0

  • latest non vulnerable version

  • first published

    8 years ago

  • latest version published

    4 years ago

  • licenses detected

  • package manager

  • Direct Vulnerabilities

    Known vulnerabilities in the org.webjars.npm:chownr package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Time of Check Time of Use (TOCTOU)

    org.webjars.npm: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)
    

    How to fix Time of Check Time of Use (TOCTOU)?

    Upgrade org.webjars.npm:chownr to version 1.1.0 or higher.

    [,1.1.0)