Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2023-23946: Path Traversal in Git git apply

Published Feb 14, 2023 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.5High · v3.1
EPSS1.1%67th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Git-Scm
IdentifiersCVE-2023-23946CWE-22 · Improper Limitation of a Pathname…

CVE-2023-23946 is a path-traversal vulnerability in Git's git apply command affecting versions before 2.39.2, 2.38.4, 2.37.6, 2.36.5, 2.35.7, 2.34.7, 2.33.7, 2.32.6, 2.31.7, and 2.30.8. A crafted patch can create a symbolic link and subsequently create or overwrite a file through that link outside the repository working tree. The write occurs with the filesystem permissions of the user executing git apply.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

An attacker can cause git apply to overwrite filesystem paths outside the working tree that are writable by the user applying the crafted patch. This can compromise the integrity of user-accessible files.

Mitigation

If you can’t patch tonight, do this now.

Before applying untrusted patches, inspect them with git apply --stat. Do not apply a patch that creates a symbolic link and then creates a file beyond that symbolic link.

Remediation

Patch, then assume compromise.

Upgrade Git to version 2.39.2, 2.38.4, 2.37.6, 2.36.5, 2.35.7, 2.34.7, 2.33.7, 2.32.6, 2.31.7, or 2.30.8, as appropriate for the maintained release branch.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
CVE-2023-23946-POCThis repository provides a proof-of-concept (POC) exploit for CVE-2023-23946, a vulnerability in git's handling of symbolic links. The exploit consists of a README.md explaining the vulnerability and exploitation steps, and an 'exploit.patch' file that demonstrates the attack. The attack involves creating a symbolic link in the repository that points outside the working tree, then applying a crafted patch that renames the symlink and writes arbitrary content to a file outside the repository. This leverages git's improper protections against symlink manipulation during patch application, allowing an attacker to write to arbitrary files on the filesystem. The exploit is local in nature and requires the attacker to have access to a vulnerable git repository. The main fingerprintable endpoint is the file path outside the working tree that the attacker targets for writing.bruno-1337 · Disclosed Sep 7, 2023 · patch · markdown · localPoCCVE-2023-23946This repository is a small Bash-based proof of concept for CVE-2023-23946 in Git. It contains two files: a README describing the vulnerability and usage, and a single executable script, exploit.sh, which is the main exploit logic. The script is interactive: it asks the operator for a target directory to symlink, a filename to create under that directory, and arbitrary file contents to embed in the patch. It then creates a temporary repository under /tmp/cve_git_patch, initializes Git, commits a symlink pointing to the chosen target directory, and generates a malicious patch file named exploit.patch. The patch performs a rename from symlink to renamed-symlink and adds a new file beneath the renamed symlink path, causing vulnerable Git patch handling to write attacker-controlled content into the symlink target when applied by the victim. The printed example command shows the intended abuse path: a different user runs /usr/bin/git apply against the crafted patch, potentially enabling local privilege abuse or lateral access, such as planting an SSH authorized_keys file. There are no network callbacks or remote C2 endpoints in the exploit itself; it is a local file-manipulation exploit that weaponizes Git patch application behavior.tralsesec · Disclosed May 16, 2026 · markdown · bash · local · filePoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Git-ScmGitapplication
FAQ

Frequently asked questions

Is CVE-2023-23946 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2023-23946 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2023-23946?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2023-23946, the earliest disclosed Sep 7, 2023.
Is there a patch for CVE-2023-23946?
Upgrade Git to version 2.39.2, 2.38.4, 2.37.6, 2.36.5, 2.35.7, 2.34.7, 2.33.7, 2.32.6, 2.31.7, or 2.30.8, as appropriate for the maintained release branch.
What products are affected by CVE-2023-23946?
Git-Scm Git.
How severe is CVE-2023-23946?
CVE-2023-23946 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 1.1% (67th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.