CVE-2024-32021
git: symlink bypass
Overview
Description
Git is a revision control system. Prior to versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4, when cloning a local source repository that contains symlinks via the filesystem, Git may create hardlinks to arbitrary user-readable files on the same filesystem as the target repository in the objects/ directory. Cloning a local repository over the filesystem may creating hardlinks to arbitrary user-owned files on the same filesystem in the target Git repository's objects/ directory. When cloning a repository over the filesystem (without explicitly specifying the file:// protocol or --no-local), the optimizations for local cloning
will be used, which include attempting to hard link the object files instead of copying them. While the code includes checks against symbolic links in the source repository, which were added during the fix for CVE-2022-39253, these checks can still be raced because the hard link operation ultimately follows symlinks. If the object on the filesystem appears as a file during the check, and then a symlink during the operation, this will allow the adversary to bypass the check and create hardlinks in the destination objects directory to arbitrary, user-readable files. 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.
Source: OX vulnerability database
Severity
7.1 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness: CWE-547
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Bitnami | git | <2.39.4>=2.40.0, <2.40.2>=2.41.0, <2.41.1>=2.42.0, <2.42.2>=2.43.0, <2.43.4+2 more | 2.39.42.40.22.41.12.42.22.43.4 |
Open a package to see all its vulnerabilities.
Operating systems · 44 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | git | 0:2.45.2-1.azl3 |
Oracle Linux 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | git +14 | 2.43.5-1.el8_10 |
| 9 | git +14 | 2.43.5-1.el9_4 |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | git +2 | 2.39.3-1.ph4 |
| 5.0 | git +2 | 2.39.3-1.ph5 |
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | rh-git227-git +16 | affected | — |
| 7 | emacs-git +17 | eol | — |
| 8 | git +14 | 0:2.43.5-1.el8_10 | RHSA-2024:4084 |
| 9 | git +14 | 0:2.39.5-1.el9_2 | RHSA-2024:4368 |
| 9 | git +14 | 0:2.43.5-1.el9_4 | RHSA-2024:4083 |
SUSE Linux Enterprise 4 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | git +8 | 2.26.2-27.78.1 | SUSE-SU-2025:0197-1 |
| 15.4 | git +11 | 2.35.3-150300.10.39.1 | SUSE-SU-2024:1807-1 |
| 15.5 | git +11 | 2.35.3-150300.10.39.1 | SUSE-SU-2024:1807-1 |
| 15.6 | git +11 | 2.43.0-150600.3.3.1 | SUSE-SU-2024:2277-1 |
SUSE Linux Enterprise Micro 2 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.5 | git +2 | 2.35.3-150300.10.39.1 | SUSE-SU-2024:1807-1 |
| 6.0 | git +2 | 2.45.1-1.1 | SUSE-SU-2025:20049-1 |
alma 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | git +14 | 2.43.5-1.el8_10 |
| 9 | git +14 | 2.43.5-1.el9_4 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | git | 2.45.1-r0 |
| 3.23 | git | 2.45.1-r0 |
| 3.24 | git | 2.45.1-r0 |
| edge | git | 2.45.1-r0 |
amazon linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 2023 | git +21 | 2.40.1-1.amzn2023.0.3 |
chainguard 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| git | 2.45.1-r0 |
debian 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | git | 1:2.20.1-2+deb10u9 |
| 11 | git | 1:2.30.2-1+deb11u3 |
| 12 | git | 1:2.39.5-0+deb12u1 |
| 13 | git | 1:2.45.1-1 |
| 14 | git | 1:2.45.1-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| git | 1:2.39.5-0+deb12u1 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | git +13 | 2.45.1-1.1 | openSUSE-SU-2024:13968-1 |
rocky 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | git +14 | 2.43.5-1.el8_10 |
| 9 | git +14 | 2.43.5-1.el9_4 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-git | 1:2.30.2-1+deb11u3 |
| 12 | rootio-git | 1:2.39.5-0+deb12u1 |
| 13 | rootio-git | 1:2.45.1-1 |
root.io ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | rootio-git | 1:2.34.1-1ubuntu1.11 |
| 24.04 | rootio-git | 1:2.43.0-1ubuntu7.1 |
ubuntu 5 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | git | 1:2.17.1-1ubuntu0.18+esm1 |
| 20.04 | git | 1:2.25.1-1ubuntu3.12 |
| 20.04-ESM | git | 1:2.25.1-1ubuntu3.12 |
| 22.04 | git | 1:2.34.1-1ubuntu1.11 |
| 24.04 | git | 1:2.43.0-1ubuntu7.1 |
wolfi 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| git | 2.45.1-r0 |
References
- www.openwall.com http://www.openwall.com/lists/oss-security/2024/05/14/2
- access.redhat.com https://access.redhat.com/errata/RHSA-2024:4083
- access.redhat.com https://access.redhat.com/errata/RHSA-2024:4084
- access.redhat.com https://access.redhat.com/security/cve/CVE-2024-32021
- bugzilla.redhat.com https://bugzilla.redhat.com/2280421
- bugzilla.redhat.com https://bugzilla.redhat.com/2280428
- bugzilla.redhat.com https://bugzilla.redhat.com/2280446
- bugzilla.redhat.com https://bugzilla.redhat.com/2280466
- bugzilla.redhat.com https://bugzilla.redhat.com/2280484
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2280421
Show all 32 references
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2280428
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2280446
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2280466
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2280484
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-32002
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-32004
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-32020
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-32021
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-32465
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2024-4083.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2024:4084
- github.com https://github.com/git/git/security/advisories/GHSA-mvxm-9j2h-qjx7
- linux.oracle.com https://linux.oracle.com/cve/CVE-2024-32021.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2024-4084.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2024/06/msg00018.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2024/09/msg00009.html
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S4CK4IYTXEOBZTEM5K3T6LWOIZ3S44AR/
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-32021
- ubuntu.com https://ubuntu.com/security/notices/USN-6793-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7023-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2024-32021
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.