CVE-2023-23946 json
Git's `git apply` overwriting paths outside the working tree
published 2023-02-14 3 y ago modified 2026-10-08 31 d ago also EUVD-2023-28012
- cvss
- 6.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.1%
- EPSS 1.1% chance of exploitation in 30 days, percentile 66%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- git-scm git 2.30.8, 2.31.7, 2.32.6, 2.33.7, 2.34.7, 2.35.7, 2.36.5, 2.37.6, 2.38.4, 2.39.2
- git Debian 14, Debian 13, Debian 12 1:2.39.2-1
debian advisories DEBIAN-CVE-2023-23946
- git Ubuntu 18.04 LTS 1:2.17.1-1ubuntu0.16
- git Ubuntu 20.04 LTS 1:2.25.1-1ubuntu3.10
- git Ubuntu 22.04 LTS 1:2.34.1-1ubuntu1.8
- git Ubuntu Pro 16.04 LTS 1:2.7.4-0ubuntu1.10+esm5
ubuntu advisories UBUNTU-CVE-2023-23946
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git RHEL 9 2.39.3-1.el9_2
- gitk RHEL 9 2.39.3-1.el9_2
- gitweb RHEL 9 2.39.3-1.el9_2
- git-all RHEL 9 2.39.3-1.el9_2
- git-gui RHEL 9 2.39.3-1.el9_2
- git-svn RHEL 9 2.39.3-1.el9_2
- git-core RHEL 9 2.39.3-1.el9_2
- perl-Git RHEL 9 2.39.3-1.el9_2
red hat advisories RHSA-2024:0407RHSA-2023:3245RHSA-2023:3246
- git SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Real Time 15 SP3 +9 more 2.35.3-150300.10.24.1
- git SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +7 more 2.26.2-27.66.1
- git SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES 15 SP2-LTSS +5 more 2.26.2-150000.47.1
suse advisories SUSE-SU-2023:0430-1SUSE-SU-2023:0426-1SUSE-SU-2023:0418-1
- git openSUSE Tumbleweed 2.39.2-1.1
opensuse advisories openSUSE-SU-2024:12698-1
- git AlmaLinux 9 2.39.3-1.el9_2
- gitk AlmaLinux 9 2.39.3-1.el9_2
- gitweb AlmaLinux 9 2.39.3-1.el9_2
- git-all AlmaLinux 9 2.39.3-1.el9_2
- git-gui AlmaLinux 9 2.39.3-1.el9_2
- git-svn AlmaLinux 9 2.39.3-1.el9_2
- git-core AlmaLinux 9 2.39.3-1.el9_2
- perl-Git AlmaLinux 9 2.39.3-1.el9_2
almalinux advisories ALSA-2023:3245ALSA-2023:3246
- git Rocky Linux 8 2.39.3-1.el8_8
rocky linux advisories RLSA-2023:3246
- git Alpine 3.14 2.32.6-r0
- git Alpine 3.15 2.34.7-r0
- git Alpine 3.16 2.36.5-r0
- git Alpine 3.17 2.38.4-r0
- git Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 2.39.2-r0
alpine advisories ALPINE-CVE-2023-23946
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/git/git@c867e4f commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-23946 updated cvss 7.5
git: git apply: a path outside the working tree can be overwritten with crafted input
-
Red Hat Enterprise Linux 6 git, gitk, gitweb, git-all, git-cvs, git-gui, +6 more Red Hat Enterprise Linux 7 git, gitk, git-hg, git-p4, gitweb, git-all, +12 more Red Hat JBoss Data Grid 7 gitaffected: workaround, no fix planned “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.”
-
Red Hat Enterprise Linux AppStream (v. 8) git 2.39.3-1.el8_8, gitk 2.39.3-1.el8_8, gitweb 2.39.3-1.el8_8, git-all 2.39.3-1.el8_8, git-gui 2.39.3-1.el8_8, git-svn 2.39.3-1.el8_8, +8 morefixed: vendor fix “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.” RHSA-2023:3246
-
Red Hat Enterprise Linux AppStream (v. 9) git 2.39.3-1.el9_2, gitk 2.39.3-1.el9_2, gitweb 2.39.3-1.el9_2, git-all 2.39.3-1.el9_2, git-gui 2.39.3-1.el9_2, git-svn 2.39.3-1.el9_2, +8 morefixed: vendor fix “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.” RHSA-2023:3245
-
Red Hat Enterprise Linux AppStream EUS (v.8.6) git 2.31.8-1.el8_6, gitk 2.31.8-1.el8_6, gitweb 2.31.8-1.el8_6, git-all 2.31.8-1.el8_6, git-gui 2.31.8-1.el8_6, git-svn 2.31.8-1.el8_6, +8 morefixed: vendor fix “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.” RHSA-2024:0407
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-24-046-11 updated cvss 6.2
Siemens SCALANCE XCM-/XRM-300
-
Siemens SCALANCE XCH328 (6GK5328-4TS01-2EC2) <V2.4 Siemens SCALANCE XCM324 (6GK5324-8TS01-2AC2) <V2.4 Siemens SCALANCE XCM328 (6GK5328-4TS01-2AC2) <V2.4 Siemens SCALANCE XCM332 (6GK5332-0GA01-2AC2) <V2.4 Siemens SCALANCE XRH334 (24 V DC, 8xFO, CC) (6GK5334-2TS01-2ER3) <V2.4 Siemens SCALANCE XRM334 (2x230 V AC, 8xFO) (6GK5334-2TS01-4AR3) <V2.4affected: fixed in V2.4 support.industry.siemens.com
+5 more productsfewer
Siemens SCALANCE XRM334 (2x230 V AC, 12xFO) (6GK5334-3TS01-4AR3) <V2.4 Siemens SCALANCE XRM334 (24 V DC, 8xFO) (6GK5334-2TS01-2AR3) <V2.4 Siemens SCALANCE XRM334 (24 V DC, 12xFO) (6GK5334-3TS01-2AR3) <V2.4 Siemens SCALANCE XRM334 (230 V AC, 8xFO) (6GK5334-2TS01-3AR3) <V2.4 Siemens SCALANCE XRM334 (230 V AC, 12xFO) (6GK5334-3TS01-3AR3) <V2.4
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 31 d ago
Exploit prediction
1.14% chance of exploitation in the next 30 days, higher than 66% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected products
- git git
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
Sources
- CVE List CVE-2023-23946
- NVD CVE-2023-23946
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.