Git's protections for cloning untrusted repositories can be bypassed
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 3 fixed, 4 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
Git is a revision control system. The Git project recommends to avoid working in untrusted repositories, and instead to clone it first with `git clone --no-local` to obtain a clean copy. Git has specific protections to make that a safe operation even with an untrusted source repository, but vulnerabilities allow those protections to be bypassed. In the context of cloning local repositories owned by other users, this vulnerability has been covered in CVE-2024-32004. But there are circumstances where the fixes for CVE-2024-32004 are not enough: For example, when obtaining a `.zip` file containing a full copy of a Git repository, it should not be trusted by default to be safe, as e.g. hooks could be configured to run within the context of that repository. The problem has been patched in versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4. As a workaround, avoid using Git in repositories that have been obtained via archives from untrusted sources.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Git | git | = 2.45.0; = 2.44.0; 2.43.0 to before 2.43.4; 2.42.0 to before 2.42.2; = 2.41.0; 2.40.0 to before 2.40.2; before 2.39.4 | 2.43.4, 2.42.2, 2.40.2, 2.39.4 | Patch available | CNA |
- git VendorGit Affected = 2.45.0; = 2.44.0; 2.43.0 to before 2.43.4; 2.42.0 to before 2.42.2; = 2.41.0; 2.40.0 to before 2.40.2; before 2.39.4 Fixed in 2.43.4, 2.42.2, 2.40.2, 2.39.4 Patch available CNA
CPE configurations NVD · 7
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* | before 2.39.4; 2.40.0 to before 2.40.2; 2.42.0 to before 2.42.2; 2.43.0 to before 2.43.4 | Vulnerable | Git-scm |
| cpe:2.3:a:git-scm:git:2.41.0:*:*:*:*:*:*:* | 2.41.0 | Vulnerable | Git-scm |
| cpe:2.3:a:git-scm:git:2.44.0:*:*:*:*:*:*:* | 2.44.0 | Vulnerable | Git-scm |
| cpe:2.3:a:git-scm:git:2.45.0:*:*:*:*:*:*:* | 2.45.0 | Vulnerable | Git-scm |
| cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* | 40 | Vulnerable | Fedoraproject |
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions before 2.39.4; 2.40.0 to before 2.40.2; 2.42.0 to before 2.42.2; 2.43.0 to before 2.43.4 Vulnerable ·Git-scm
- cpe:2.3:a:git-scm:git:2.41.0:*:*:*:*:*:*:* Versions 2.41.0 Vulnerable ·Git-scm
- cpe:2.3:a:git-scm:git:2.44.0:*:*:*:*:*:*:* Versions 2.44.0 Vulnerable ·Git-scm
- cpe:2.3:a:git-scm:git:2.45.0:*:*:*:*:*:*:* Versions 2.45.0 Vulnerable ·Git-scm
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* Versions 40 Vulnerable ·Fedoraproject
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
Remediation
- Fix · CNA git (git) Fixed in 2.43.4, 2.42.2, 2.40.2, 2.39.4
Red Hat 3 advisories
- RHSA-2024:4368 Released 2024-07-08 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream EUS (v.9.2) git-2.39.5-1.el9_2, git-all-2.39.5-1.el9_2, git-core-2.39.5-1.el9_2 +12
- RHSA-2024:4083 Released 2024-06-25 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 9) git-2.43.5-1.el9_4, git-all-2.43.5-1.el9_4, git-core-2.43.5-1.el9_4 +12
- RHSA-2024:4084 Released 2024-06-25 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 8) git-2.43.5-1.el8_10, git-all-2.43.5-1.el8_10, git-core-2.43.5-1.el8_10 +12
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Fuse 7 | Affected | No fix planned: Will not fix |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2024:4084 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2024:4083 |
| Red Hat Enterprise Linux AppStream EUS (v.9.2) | Fixed | RHSA-2024:4368 |
Not affected: 1 product
- Red Hat Enterprise Linux 10
Timeline
- 2026-10-02 Threatist record created from CVE-2024-32465
References
Advisory 5
- https://github.com/git/git/security/advisories/GHSA-vm9j-46j9-qvq4
- https://lists.fedoraproject.org/archives/list/[email protected]/message/S4CK4IYTXEOBZTEM5K3T6LWOIZ3S44AR/
- http://www.openwall.com/lists/oss-security/2024/05/14/2
- https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html
More Git vulnerabilities
- 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
Sources
- CVE-2024-32465 · CVE Program
- CVE-2024-32465 · NVD
- FIRST EPSS
- CVE-2024-32465 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences