cve.bz

CVE-2023-23946 git-scm git: Path traversal

7.5 highEPSS 1.1%Fix available

High (7.5) in git-scm git. EPSS 1.1% estimated probability of exploitation activity in the next 30 days.

On this page
Git, a revision control system, is vulnerable to path traversal prior to versions 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. 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`. A fix has been prepared and will appear in v2.39.2, v2.38.4, v2.37.6, v2.36.5, v2.35.7, v2.34.7, v2.33.7, v2.32.6, v2.31.7, and v2.30.8. 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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
1.1% (unchanged from 1.1% a week ago; 1.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 67th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-23946 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-23946?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-23946?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-23946 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
git-scm:gitbefore 2.30.8
git-scm:gitfrom 2.31.0 before 2.31.7
git-scm:gitfrom 2.32.0 before 2.32.6
git-scm:gitfrom 2.33.0 before 2.33.7
git-scm:gitfrom 2.34.0 before 2.34.7
git-scm:gitfrom 2.35.0 before 2.35.7
git-scm:gitfrom 2.36.0 before 2.36.5
git-scm:gitfrom 2.37.0 before 2.37.6
git-scm:gitfrom 2.38.0 before 2.38.4
git-scm:gitfrom 2.39.0 before 2.39.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10git1:2.20.1-2+deb10u8DLA-3338-1
Debian11git1:2.30.2-1+deb11u2DSA-5357-1
Debian12, 13, 14git1:2.39.2-1DEBIAN-CVE-2023-23946
Ubuntu18.04:LTSgit1:2.17.1-1ubuntu0.16UBUNTU-CVE-2023-23946 USN-5871-1
Ubuntu20.04:LTSgit1:2.25.1-1ubuntu3.10UBUNTU-CVE-2023-23946 USN-5871-1
Ubuntu22.04:LTSgit1:2.34.1-1ubuntu1.8UBUNTU-CVE-2023-23946 USN-5871-1
UbuntuPro:16.04:LTSgit1:2.7.4-0ubuntu1.10+esm5UBUNTU-CVE-2023-23946 USN-5871-1
Red Hatenterprise_linux:8::appstreamgit, gitk, gitweb and 17 more0:2.39.3-1.el8_8RHSA-2023:3246
Red Hatenterprise_linux:9::appstreamgit, gitk, gitweb and 17 more0:2.39.3-1.el9_2RHSA-2023:3245
Red Hatrhel_eus:8.6::appstreamgit, gitk, gitweb and 17 more0:2.31.8-1.el8_6RHSA-2024:0407
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 4 moregit2.26.2-150000.47.1SUSE-SU-2023:0418-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-ESPOS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 8 moregit2.35.3-150300.10.24.1SUSE-SU-2023:0430-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP4-LTSS and 7 moregit2.26.2-27.66.1SUSE-SU-2023:0426-1
openSUSELeap 15.4git2.26.2-150000.47.1SUSE-SU-2023:0418-1
openSUSELeap 15.4git2.35.3-150300.10.24.1SUSE-SU-2023:0430-1
openSUSETumbleweedgit2.39.2-1.1openSUSE-SU-2024:12698-1
AlmaLinux8git, gitk, gitweb and 12 more2.39.3-1.el8_8ALSA-2023:3246
AlmaLinux9git, gitk, gitweb and 12 more2.39.3-1.el9_2ALSA-2023:3245
Rocky Linux8git0:2.39.3-1.el8_8RLSA-2023:3246
Alpinev3.14git2.32.6-r0ALPINE-CVE-2023-23946
Alpinev3.15git2.34.7-r0ALPINE-CVE-2023-23946
Alpinev3.16git2.36.5-r0ALPINE-CVE-2023-23946
Alpinev3.17git2.38.4-r0ALPINE-CVE-2023-23946
Alpinev3.18, v3.19, v3.20 and 4 moregit2.39.2-r0ALPINE-CVE-2023-23946

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability marked as Moderate severity and it's less likely to be exploitable because it requires a specially crafted malicious patch to be applied via git apply, to overwrite files outside the working tree of the user running git apply. This could lead to some compromise of integrity of resources under certain circumstances, however it does not compromise the whole system or gain additional privileges to execute arbitrary code, or allow remote users to cause a denial of service.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8git-0:2.39.3-1.el8_8Fixed 2023-05-22RHSA-2023:3246
Red Hat Enterprise Linux 8.6 Extended Update Supportgit-0:2.31.8-1.el8_6Fixed 2024-01-25RHSA-2024:0407
Red Hat Enterprise Linux 9git-0:2.39.3-1.el9_2Fixed 2023-05-22RHSA-2023:3245
Red Hat Enterprise Linux 6gitOut of support scope
Red Hat Enterprise Linux 7gitOut of support scope
Red Hat JBoss Data Grid 7gitOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-23946.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-046-11Siemens SCALANCE XCM-/XRM-3002024-02-13MultipleSCALANCE XCH328 (6GK5328-4TS01-2EC2), SCALANCE XCM324 (6GK5324-8TS01-2AC2), SCALANCE XCM328 (6GK5328-4TS01-2AC2) and 8 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • tralsesec/CVE-2023-23946 Harbor Check: matches CVE 0 stars, Shell, created
    Original standalone Proof-of-Concept exploit for CVE-2023-23946 (Git path traversal via crafted patches in git-apply).

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON