CVE-2022-29187
Bypass of safe.directory protections in Git
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
Git es un sistema de control de revisión distribuido. Git versiones anteriores a 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4 y 2.30.5, es vulnerable a la escalada de privilegios en todas las plataformas. Un usuario desprevenido aún podría verse afectado por el problema reportado en CVE-2022-24765, por ejemplo cuando navega como root en un directorio tmp compartido que es de su propiedad, pero donde un atacante podría crear un repositorio git. Las versiones 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4 y 2.30.5 contienen un parche para este problema. La forma más sencilla de evitar ser afectado por la explotación descrita en el ejemplo es evitar ejecutar git como root (o como administrador en Windows), y si es necesario reducir su uso al mínimo. Aunque no es posible una mitigación genérica, un sistema puede ser reforzado contra la explotación descrito en el ejemplo eliminando cualquier repositorio de este tipo si ya se presenta y creando uno como root para bloquear cualquier ataque futuro
A vulnerability was found in Git. This flaw occurs due to Git not checking the ownership of directories in a local multi-user system when running commands specified in the local repository configuration. This issue allows the owner of the repository to cause arbitrary commands to be executed by other users who access the repository.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-04-13 CVE Reserved
- 2022-07-12 CVE Published
- 2023-10-17 EPSS Updated
- 2024-08-03 CVE Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-282: Improper Ownership Management
- CWE-427: Uncontrolled Search Path Element
CAPEC
References (17)
URL | Tag | Source |
---|---|---|
http://seclists.org/fulldisclosure/2022/Nov/1 | Mailing List | |
http://www.openwall.com/lists/oss-security/2022/07/14/1 | Mailing List | |
https://github.blog/2022-04-12-git-security-vulnerability-announced | Third Party Advisory | |
https://github.com/git/git/security/advisories/GHSA-j342-m5hw-rr3v | Third Party Advisory | |
https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html | Mailing List | |
https://lore.kernel.org/git/xmqqv8s2fefi.fsf%40gitster.g/T/#u | ||
https://support.apple.com/kb/HT213496 | Third Party Advisory |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.30.3 < 2.30.5 Search vendor "Git-scm" for product "Git" and version " >= 2.30.3 < 2.30.5" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.31.2 < 2.31.4 Search vendor "Git-scm" for product "Git" and version " >= 2.31.2 < 2.31.4" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.32.1 < 2.32.3 Search vendor "Git-scm" for product "Git" and version " >= 2.32.1 < 2.32.3" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.33.2 < 2.33.4 Search vendor "Git-scm" for product "Git" and version " >= 2.33.2 < 2.33.4" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.34.2 < 2.34.4 Search vendor "Git-scm" for product "Git" and version " >= 2.34.2 < 2.34.4" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.35.2 < 2.35.4 Search vendor "Git-scm" for product "Git" and version " >= 2.35.2 < 2.35.4" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.36.0 < 2.36.2 Search vendor "Git-scm" for product "Git" and version " >= 2.36.0 < 2.36.2" | - |
Affected
| ||||||
Git-scm Search vendor "Git-scm" | Git Search vendor "Git-scm" for product "Git" | >= 2.37.0 < 2.37.1 Search vendor "Git-scm" for product "Git" and version " >= 2.37.0 < 2.37.1" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 35 Search vendor "Fedoraproject" for product "Fedora" and version "35" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 36 Search vendor "Fedoraproject" for product "Fedora" and version "36" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 37 Search vendor "Fedoraproject" for product "Fedora" and version "37" | - |
Affected
| ||||||
Apple Search vendor "Apple" | Xcode Search vendor "Apple" for product "Xcode" | < 14.1 Search vendor "Apple" for product "Xcode" and version " < 14.1" | - |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 10.0 Search vendor "Debian" for product "Debian Linux" and version "10.0" | - |
Affected
|