Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

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

Source
Associated Vulnerability
Title:Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution (CVE-2024-32002)
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.
Readme
# CVE-2024-32002

## STILL DEVELOPING 

This vulnerability affect Git with version:

* `2.45.0`

## Proof Of Concept

The POC can trigger an RCE (Remote Command Execution) using the `git clone` command via specific vulnerable use of submodules of git that follow symlinks, so the context need to have `core.symlinks` to `true` for work correctly.

> **NOTE:** This is possible via `git config --global core.symlinks true`

### How it work

For trigger the rce you need to use two different repositories.

The first repository include a submodule that include a specific path with a symlink to a `.git` directory.

The second repository include a malicious hook that is used as a submodule in the first repository, and contain a script called `post-checkout` that contain malicious code that will be run exploiting the case-insensitive filesystem.


**This is a vulnerability analysis tool for educational purposes only**
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →