CVE-2022-29187 Bypass of safe.directory protections in Git
Attackers can escalate privileges by exploiting safe.directory bypasses when root users navigate attacker-controlled Git repositories.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-29187?
CVE-2022-29187 is a high-severity vulnerability in Apple Xcode, published on 12 Jul 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2022-29187?
It affects 4 products.
Linux distribution packages (40)
git SUSE:Enterprise Storage 6 | All versions | 2.26.2-150000.41.1 |
git SUSE:Enterprise Storage 7 | All versions | 2.26.2-150000.41.1 |
git SUSE:HPE Helion OpenStack 8 | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 2.35.3-150300.10.15.1 |
git SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 2.35.3-150300.10.15.1 |
git SUSE:Linux Enterprise Module for Development Tools 15 SP3 | All versions | 2.35.3-150300.10.15.1 |
git SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 2.35.3-150300.10.15.1 |
git SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server 15 SP2-BCL | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server 15-LTSS | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.26.2-27.57.1 |
git SUSE:Linux Enterprise Server for SAP Applications 15 | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 2.26.2-150000.41.1 |
git SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 2.26.2-27.57.1 |
git SUSE:Manager Proxy 4.1 | All versions | 2.26.2-150000.41.1 |
git SUSE:Manager Retail Branch Server 4.1 | All versions | 2.26.2-150000.41.1 |
git SUSE:Manager Server 4.1 | All versions | 2.26.2-150000.41.1 |
git SUSE:OpenStack Cloud 8 | All versions | 2.26.2-27.57.1 |
git SUSE:OpenStack Cloud 9 | All versions | 2.26.2-27.57.1 |
git SUSE:OpenStack Cloud Crowbar 9 | All versions | 2.26.2-27.57.1 |
git openSUSE:Leap 15.3 | All versions | 2.26.2-150000.41.1 |
git openSUSE:Leap 15.3 | All versions | 2.35.3-150300.10.15.1 |
git openSUSE:Leap 15.4 | All versions | 2.26.2-150000.41.1 |
git openSUSE:Leap 15.4 | All versions | 2.35.3-150300.10.15.1 |
git openSUSE:Tumbleweed | All versions | 2.37.1-1.1 |
libgit2 openSUSE:Tumbleweed | All versions | 1.7.1-3.1 |
Products include Apple Xcode, Debian Debian Linux, Fedoraproject Fedora, Git-Scm Git.
How do I fix CVE-2022-29187?
Upgrade to a fixed version.
Is CVE-2022-29187 being exploited?
There is no known exploitation of CVE-2022-29187 in the wild and no public exploit code.
Other vulnerabilities in Apple Xcode
Sources
Also known as ALPINE-CVE-2022-29187, CLEANSTART-2026-EQ09700, DEBIAN-CVE-2022-29187, GHSA-j342-m5hw-rr3v, OESA-2022-1765, SUSE-SU-2022:2535-1 and 6 more.