CVE-2022-29187

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-29187
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-29187.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-29187
Aliases
  • GHSA-j342-m5hw-rr3v
Downstream
Related
Published
2022-07-12T00:00:00Z
Modified
2025-10-22T16:51:52.999972Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Bypass of safe.directory protections in Git
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-282",
        "CWE-427"
    ]
}
References

Affected packages

Git / github.com/git-for-windows/git

Affected ranges

Type
GIT
Repo
https://github.com/git-for-windows/git
Events

Git / github.com/git-for-windows/git

Affected ranges

Type
GIT
Repo
https://github.com/git/git
Events

Affected versions

v2.*

v2.30.3
v2.30.4