# CVE-2024-32002: Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution

> Attackers can achieve remote code execution by crafting malicious Git repositories with submodules on case-insensitive filesystems supporting symlinks.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2024
- **Updated:** 4 Nov 2025
- **Also known as:** ALPINE-CVE-2024-32002, AZL-42040, AZL-43038, BELL-CVE-2024-32002, BIT-git-2024-32002, CLEANSTART-2026-EJ88991, CLSA-2024-1718028901, CLSA-2024-1727797025, CLSA-2025-1737153672, DEBIAN-CVE-2024-32002, GHSA-8h77-4q3w-gfgv, UBUNTU-CVE-2024-32002, USN-6793-2

## What is CVE-2024-32002?

CVE-2024-32002 is a critical code injection vulnerability in git, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### 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, repositories with submodules can be crafted in a way that exploits a bug in Git whereby it can be fooled into writing files not into the submodule's worktree but into a `.git/` directory. This allows writing a hook that will be executed while the clone operation is still running, giving the user no opportunity to inspect the code that is being executed. 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. If symbolic link support is disabled in Git (e.g. via `git config --global core.symlinks false`), the described attack won't work. As always, it is best to avoid cloning repositories from untrusted sources.

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-434 (Unrestricted Upload of File with Dangerous Type), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

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


| 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: Git Git.

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

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-32002 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-32002 exists.

Public exploit code:

- Exploit PoC for CVE-2024-32002 (github_poc): https://github.com/amalmurali47/git_rce
- CVE-2024-32002 RCE PoC (github_poc): https://github.com/safebuffer/CVE-2024-32002
- Hook for the PoC for exploiting CVE-2024-32002 (github_poc): https://github.com/amalmurali47/hook
- local poc for CVE-2024-32002 (github_poc): https://github.com/M507/CVE-2024-32002
- Este script demuestra cómo explotar la vulnerabilidad CVE-2024-32002 para obtener una reverse shell, proporcionando acceso remoto al sistema afectado. Úselo con precaución en entornos controlados y solo con fines educativos o de pruebas de seguridad. (github_poc): https://github.com/YukaFake/CVE-2024-32002-Reverse-Shell
- https://github.com/jweny/CVE-2024-32002_HOOK (github_poc): https://github.com/jweny/CVE-2024-32002_HOOK

## Other vulnerabilities in git

- [CVE-2024-52005](https://insights.sbomify.com/CVE-2024-52005/): The sideband payload is passed unfiltered to the terminal in git (high 7.5)
- [CVE-2008-5517](https://insights.sbomify.com/CVE-2008-5517/): Command injection in n/a (high 7.5)
- [CVE-2008-3546](https://insights.sbomify.com/CVE-2008-3546/): Memory corruption in n/a (high 7.5)
- [CVE-2006-0477](https://insights.sbomify.com/CVE-2006-0477/): Memory corruption in n/a (high 7.5)
- [CVE-2009-2108](https://insights.sbomify.com/CVE-2009-2108/): Denial of service in n/a (medium 5.0)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-32002 is a critical code injection vulnerability in git, published on 14 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-32002 exists.

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-32002/ (Markdown: https://insights.sbomify.com/CVE-2024-32002/index.md)
```

## Sources

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

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