CVE-2022-29187: Bypass of safe.directory protections in Git
Vulnerability summary
CVE-2022-29187 is a high (CVSS 7.8) Improper Ownership Management vulnerability in apple xcode. EPSS estimates a 0.45% chance of exploitation in the next 30 days, higher than 40.4% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 9 · Related 3Timeline
- 12-07-2022PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
Description
Git is a distributed revision control system. Git prior to versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5, is vulnerable to privilege escalation in all platforms. An unsuspecting user could still be affected by the issue reported in CVE-2022-24765, for example when navigating as root into a shared tmp directory that is owned by them, but where an attacker could create a git repository. Versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5 contain a patch for this issue. The simplest way to avoid being affected by the exploit described in the example is to avoid running git as root (or an Administrator in Windows), and if needed to reduce its use to a minimum. While a generic workaround is not possible, a system could be hardened from the exploit described in the example by removing any such repository if it exists already and creating one as root to block any future attacks.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · AlpineEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.45%
Chance of exploitation in the next 30 days
Percentile
40%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.45% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-282Improper Ownership ManagementThe product assigns the wrong ownership, or does not properly verify the ownership, of an object or resource.
- CWE-427Uncontrolled Search Path ElementThe product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.
Affected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Suse34 products
- git&distro=HPE Helion OpenStack 8< 2.26.2-27.57.1
- git&distro=SUSE Enterprise Storage 6< 2.26.2-150000.41.1
- git&distro=SUSE Enterprise Storage 7< 2.26.2-150000.41.1
- git&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-ESPOS< 2.26.2-150000.41.1
- git&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS< 2.26.2-150000.41.1
Opensuse4 products
- git&distro=openSUSE Leap 15.3< 2.26.2-150000.41.1 | < 2.35.3-150300.10.15.1
- git&distro=openSUSE Leap 15.4< 2.26.2-150000.41.1 | < 2.35.3-150300.10.15.1
- git&distro=openSUSE Tumbleweed< 2.37.1-1.1
- libgit2&distro=openSUSE Tumbleweed< 1.7.1-3.1
Alpine2 products
- git≥ 2.30.3, < 2.32.3-r0 | ≥ 2.30.3, < 2.34.4-r0 | ≥ 2.30.3, < 2.36.2-r0 | ≥ 2.30.3, < 2.37.1-r0 | ≥ 2.30.3, < 2.30.5-r0 | ≥ 2.32.1, < 2.32.3-r0 | ≥ 2.34.2, < 2.34.4-r0 | ≥ 2.36.0, < 2.36.2-r0 | ≥ 2.37.0, < 2.37.1-r0
- libgit2< 1.4.4-r0
Debian2 products
- git< 1:2.37.2-1
- debian_linuxEOL10.0
Apple1 product
- xcode< 14.1
Fedoraproject1 product
- fedoraEOL35 | 36 | 37
Git1 product
- git≥ 2.30.3, < 2.30.5 | ≥ 2.31.2, < 2.31.4 | ≥ 2.32.1, < 2.32.3 | ≥ 2.33.2, < 2.33.4 | ≥ 2.34.2, < 2.34.4 | ≥ 2.35.2, < 2.35.4 | ≥ 2.36, < 2.36.2 | ≥ 2.37, < 2.37.1
Git-scm1 product
- git≥ 2.30.3, < 2.30.5 | ≥ 2.31.2, < 2.31.4 | ≥ 2.32.1, < 2.32.3 | ≥ 2.33.2, < 2.33.4 | ≥ 2.34.2, < 2.34.4 | ≥ 2.35.2, < 2.35.4 | ≥ 2.36.0, < 2.36.2 | ≥ 2.37.0, < 2.37.1
Ubuntu1 product
- git< 1:2.17.1-1ubuntu0.12 | < 1:2.25.1-1ubuntu3.5 | < 1:2.34.1-1ubuntu1.4
9 vendors · 47 products
References
26 links- github.com/git/git/security/advisories/GHSA-j342-m5hw-rr3vThird Party Advisory
- github.blog/2022-04-12-git-security-vulnerability-announcedThird Party Advisory
- lists.fedoraproject.org/archives/…Vendor Advisory
- lists.fedoraproject.org/archives/…Vendor Advisory
- support.apple.com/kb/HT213496Third Party Advisory
- lists.fedoraproject.org/archives/…Vendor Advisory
Show all 26 references
- lists.fedoraproject.org/archives/…Vendor Advisory
- lists.fedoraproject.org/archives/…Vendor Advisory
- lists.fedoraproject.org/archives/…Vendor Advisory
- security.gentoo.org/glsa/202312-15Vendor Advisory
- security.gentoo.org/glsa/202401-17Vendor Advisory