Directory Traversal Affecting nodegit package, versions <0.26.3
Threat Intelligence
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
Introduced: 10 Dec 2019
CVE-2019-1351 Open this link in a new tabHow 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
.