nodegit@0.0.10000004 vulnerabilities

Node.js libgit2 asynchronous native bindings

Direct Vulnerabilities

Known vulnerabilities in the nodegit package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Improper Link Resolution Before File Access

nodegit is a Node bindings to the libgit2 project.

Affected versions of this package are vulnerable to Improper Link Resolution Before File Access. Filenames on Linux/Unix can contain backslashes. On Windows, backslashes are directory separators. Git did not use to refuse to write out tracked files with such filenames.

The exploit uses backslashes in the file names stored in tree objects, allowing arbitrary files even outside of the Git worktree to be over-written.

Note: This is a Windows-only vulnerability.

How to fix Improper Link Resolution Before File Access?

Upgrade nodegit to version 0.26.3 or higher.

<0.26.3
  • H
Improper Handling of Alternate Data Stream

nodegit is a Node bindings to the libgit2 project.

Affected versions of this package are vulnerable to Improper Handling of Alternate Data Stream. When running Git in the Windows Subsystem for Linux (also known as "WSL") while accessing a working directory on a regular Windows drive, none of the NTFS protections were active.

This vulnerability affects Git when running inside the Windows Subsystem for Linux and only when working on Windows drives where NTFS short names are enabled (which is the case, by default, for the system drive, i.e. C:).

The exploit uses a directory named git~1 and it allows remote code execution during a regular git clone.

For this reason, Git now turns on core.protectNTFS by default, which is also required to address CVE-2019-1352.

How to fix Improper Handling of Alternate Data Stream?

Upgrade nodegit to version 0.26.3 or higher.

<0.26.3
  • H
Improper Handling of Alternate Data Stream

nodegit is a Node bindings to the libgit2 project.

Affected versions of this package are vulnerable to Improper Handling of Alternate Data Stream. Git was unaware of NTFS Alternate Data Streams, allowing files inside the .git/ directory to be overwritten during a clone.

While the description contains "NTFS", this vulnerability can not only be exploited on Windows, but also on macOS when working on smb://-mounted network shares. The exploit involves naming a directory .git::$INDEX_ALLOCATION, allowing remote code execution during a regular git clone.

The fix for this CVE requires the fix for CVE-2019-1353.

How to fix Improper Handling of Alternate Data Stream?

Upgrade nodegit to version 0.26.3 or higher.

<0.26.3
  • H
Directory Traversal

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.

How to fix Directory Traversal?

Upgrade nodegit to version 0.26.3 or higher.

<0.26.3