Read the docs
TI-2022-11730 Aliases CVE-2022-29187

Bypass of safe.directory protections in Git

Priority LOW 34CWE-282Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 3 fixed, 1 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-427.

Summary

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.

Why it matters now

EPSS 0.00446 38th percentileScored 2026-11-07
Fix Partial git (git): 2.30.5, 2.31.4, 2.32.3 +5Red Hat: 3 advisoriesRed Hat: 3 fixed, 1 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
Gitgit2.30.3 to before 2.30.5; 2.31.2 to before 2.31.4; 2.32.1 to before 2.32.3; 2.33.2 to before 2.33.4; 2.34.2 to before 2.34.4; 2.35.2 to before 2.35.4; 2.36 to before 2.36.2; 2.37 to before 2.37.12.30.5, 2.31.4, 2.32.3, 2.33.4, 2.34.4, 2.35.4, 2.36.2, 2.37.1Patch availableCNA
  • git VendorGit Affected 2.30.3 to before 2.30.5; 2.31.2 to before 2.31.4; 2.32.1 to before 2.32.3; 2.33.2 to before 2.33.4; 2.34.2 to before 2.34.4; 2.35.2 to before 2.35.4; 2.36 to before 2.36.2; 2.37 to before 2.37.1 Fixed in 2.30.5, 2.31.4, 2.32.3, 2.33.4, 2.34.4, 2.35.4, 2.36.2, 2.37.1 Patch available CNA

CPE configurations NVD · 6

CPEVersionsRoleVendor
cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:*2.30.3 to before 2.30.5; 2.31.2 to before 2.31.4; 2.32.1 to before 2.32.3; 2.33.2 to before 2.33.4; 2.34.2 to before 2.34.4; 2.35.2 to before 2.35.4; 2.36.0 to before 2.36.2; 2.37.0 to before 2.37.1VulnerableGit-scm
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*35VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*36VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*37VulnerableFedoraproject
cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:*before 14.1VulnerableApple
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*10.0VulnerableDebian
  • cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions 2.30.3 to before 2.30.5; 2.31.2 to before 2.31.4; 2.32.1 to before 2.32.3; 2.33.2 to before 2.33.4; 2.34.2 to before 2.34.4; 2.35.2 to before 2.35.4; 2.36.0 to before 2.36.2; 2.37.0 to before 2.37.1 Vulnerable ·Git-scm
  • cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
  • cpe:2.3:a:apple:xcode:*:*:*:*:*:*:*:* Versions before 14.1 Vulnerable ·Apple
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian

Remediation

  • Fix · CNA git (git) Fixed in 2.30.5, 2.31.4, 2.32.3, 2.33.4, 2.34.4, 2.35.4, 2.36.2, 2.37.1

Red Hat 3 advisories

  • RHSA-2024:0407 Released 2024-01-25 · Red Hat rating Moderate
    git security update
    • Red Hat Enterprise Linux AppStream EUS (v.8.6) git-2.31.8-1.el8_6, git-all-2.31.8-1.el8_6, git-core-2.31.8-1.el8_6 +12
  • RHSA-2023:2859 Released 2023-05-16 · Red Hat rating Moderate
    git security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 8) git-2.39.1-1.el8, git-all-2.39.1-1.el8, git-core-2.39.1-1.el8 +12
  • RHSA-2023:2319 Released 2023-05-09 · Red Hat rating Moderate
    git security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 9) git-2.39.1-1.el9, git-all-2.39.1-1.el9, git-core-2.39.1-1.el9 +12

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat JBoss Data Grid 7AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2023:2859
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2023:2319
Red Hat Enterprise Linux AppStream EUS (v.8.6)Fixed RHSA-2024:0407
Not affected: 3 products
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Software Collections

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-29187

References

  • TI-2025-30709 Git allows arbitrary code execution through broken config quoting KEVCVSS 3.1HIGH 8.1
  • TI-2022-07580 gitattributes parsing integer overflow in git CVSS 3.1CRITICAL 9.8
  • TI-2022-20244 Integer overflow in `git archive`, `git log --format` leading to RCE in git CVSS 3.1CRITICAL 9.8
  • TI-2021-04400 malicious repositories can execute remote code while cloning CVSS 3.1HIGH 8.0
  • TI-2024-21101 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution CVSS 3.1CRITICAL 9.1
  • TI-2023-10933 "git apply --reject" partially-controlled arbitrary file write CVSS 3.1HIGH 7.5
See all 31 →

Sources