Skip to main content

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CVE-2023-23946

Severity High
Score 7.5/10

Summary

Git, a revision control system, is vulnerable to path traversal versions prior to 2.30.8, 2.31.x prior to 2.31.7, 2.32.x prior to 2.32.6, 2.33.x prior to 2.33.7, 2.34.x prior to 2.34.7, 2.35.x prior to 2.35.7, 2.36.x prior to 2.36.5, 2.37.x prior to 2.37.6, 2.38.x prior to 2.38.4, and 2.39.x prior to 2.39.2. By feeding a crafted input to `git apply`, a path outside the working tree can be overwritten as the user who is running `git apply`. As a workaround, use `git apply --stat` to inspect a patch before applying; avoid applying one that creates a symbolic link and then creates a file beyond the symbolic link.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • NONE
  • NONE
  • NONE
  • NONE

CWE-22 - Path Traversal

Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.

Advisory Timeline

  • Published