CVE-2026-114145 (GHSA-83vg-56qc-22m7) is an arbitrary code execution vulnerability in GitPython's submodule handling. The root cause is an incorrect ordering of validation versus mutation: Submodule.add (exposed as Repo.create_submodule) accepts an attacker-influenced path, runs only a permissive containment check (_to_relative_path) that does not reject .git aliases, and then clones the submodule into that path via _clone_repo before the strict .git-alias check (_validate_repo_path) runs at the index boundary. A path of .git/hooks therefore causes the submodule to be cloned directly into the live hooks directory, planting an attacker-controlled executable post-checkout hook that git runs on the next checkout.
The fix commit 97eadb888d2f99567e3113f4e455be4ca128f697 moves the strict validation before mutation by: (1) adding _validate_repo_path(path) to _to_relative_path, (2) passing git_dirs=(repo.git_dir, repo.common_dir) into _checked_abspath and adding a filesystem-identity check that rejects checkout paths aliasing Git metadata, and (3) re-checking _module_abspath after cloning. The vulnerable functions are those that existed before the fix and lacked these checks: Submodule.add (the public entry point that performs clone-before-validate), Submodule._clone_repo (the mutation step that clones into the attacker-controlled destination), Submodule._to_relative_path (the permissive pre-clone check that failed to reject .git), and Submodule._checked_abspath (the path computation that lacked the metadata-alias rejection).