nodegit@0.25.1

Vulnerabilities

4 via 4 paths

Dependencies

146

Source

npm

Find, fix and prevent vulnerabilities in your code.

Severity
  • 4
Status
  • 4
  • 0
  • 0

high severity

Directory Traversal

  • Vulnerable module: nodegit
  • Introduced through: nodegit@0.25.1

Detailed paths

  • Introduced through: nodegit@0.25.1
    Remediation: Upgrade to nodegit@0.26.3.

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.

Remediation

Upgrade nodegit to version 0.26.3 or higher.

References

high severity

Improper Handling of Alternate Data Stream

  • Vulnerable module: nodegit
  • Introduced through: nodegit@0.25.1

Detailed paths

  • Introduced through: nodegit@0.25.1
    Remediation: Upgrade to nodegit@0.26.3.

Overview

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.

Remediation

Upgrade nodegit to version 0.26.3 or higher.

References

high severity

Improper Handling of Alternate Data Stream

  • Vulnerable module: nodegit
  • Introduced through: nodegit@0.25.1

Detailed paths

  • Introduced through: nodegit@0.25.1
    Remediation: Upgrade to nodegit@0.26.3.

Overview

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.

Remediation

Upgrade nodegit to version 0.26.3 or higher.

References

high severity

Improper Link Resolution Before File Access

  • Vulnerable module: nodegit
  • Introduced through: nodegit@0.25.1

Detailed paths

  • Introduced through: nodegit@0.25.1
    Remediation: Upgrade to nodegit@0.26.3.

Overview

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.

Remediation

Upgrade nodegit to version 0.26.3 or higher.

References