# CVE-2024-32020: Race condition in git

> An untrusted user can modify objects in a cloned Git repository by exploiting hardlinking during local clones, compromising data integrity.

- **Severity:** Low 3.9 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 14 May 2024
- **Updated:** 13 Feb 2025
- **Also known as:** ALPINE-CVE-2024-32020, AZL-42037, AZL-43033, BELL-CVE-2024-32020, BIT-git-2024-32020, CLEANSTART-2026-MV02449, CLSA-2024-1730479456, CLSA-2024-1731432257, CLSA-2025-1762536892, DEBIAN-CVE-2024-32020, GHSA-5rfh-556j-fhgj, ROOT-OS-DEBIAN-11-CVE-2024-32020, UBUNTU-CVE-2024-32020

## What is CVE-2024-32020?

CVE-2024-32020 is a low-severity vulnerability in Fedoraproject Fedora, published on 14 May 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official 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, local clones may end up hardlinking files into the target repository's object database when source and target repository reside on the same disk. If the source repository is owned by a different user, then those hardlinked files may be rewritten at any point in time by the untrusted user. Cloning local repositories will cause Git to either copy or hardlink files of the source repository into the target repository. This significantly speeds up such local clones compared to doing a "proper" clone and saves both disk space and compute time. When cloning a repository located on the same disk that is owned by a different user than the current user we also end up creating such hardlinks. These files will continue to be owned and controlled by the potentially-untrusted user and can be rewritten by them at will in the future. 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.

Weakness: CWE-281 (Improper Preservation of Permissions)

## Which versions are affected by CVE-2024-32020?

1 open source package ship an affected version, including git. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `git` | Bitnami | All versions | 2.39.4, 2.40.2, 2.41.1, 2.42.2, 2.43.4, 2.44.1, 2.45.1 |

Products: Fedoraproject Fedora, Git-Scm Git.

## How do I fix CVE-2024-32020?

Upgrade git to a fixed version for your release line: 2.39.4, 2.40.2, 2.41.1 or 2.42.2.

## Is CVE-2024-32020 being exploited?

There is no known exploitation of CVE-2024-32020 in the wild and no public exploit code.

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-32020 and fix it if it is affected.

What it is: CVE-2024-32020 is a low-severity vulnerability in Fedoraproject Fedora, published on 14 May 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-32020 in the wild and no public exploit code.

Affected packages and fixed versions:
- git (Bitnami): affected all versions; fixed in 2.39.4, 2.40.2, 2.41.1, 2.42.2, 2.43.4, 2.44.1, 2.45.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-32020/ (Markdown: https://insights.sbomify.com/CVE-2024-32020/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-32020
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-32020
- OSV: https://osv.dev/vulnerability/CVE-2024-32020

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-32020/
Summaries are generated and may contain mistakes; the official description above is the record.
