Directory Traversal Affecting nodegit package, versions <0.26.3


0.0
high

Snyk CVSS

    Attack Complexity High
    Scope Changed
    Integrity High
    Availability High

    Threat Intelligence

    EPSS 0.24% (65th percentile)
Expand this section
NVD
7.5 high
Expand this section
SUSE
7.5 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-NODEGIT-542720
  • published 7 Jan 2020
  • disclosed 10 Dec 2019
  • credit Unknown

How to fix?

Upgrade nodegit to version 0.26.3 or higher.

Overview

nodegit is a Node bindings to the libgit2 project.

Affected versions of this package are vulnerable to Directory Traversal. While the only permitted drive letters for physical drives on Windows are letters of the US-English alphabet, this restriction does not apply to virtual drives assigned via subst <letter>: <path>. Git mistook such paths for relative paths, allowing writing outside of the worktree while cloning.

This vulnerability can only be exploited on Windows, and only when the targeted user is known to use non-alphabetical drive letters on logical drives registered with the subst.exe command, allowing to overwrite arbitrary files on said logical drive during a regular git clone.