HIGHCVSS v3.1 7.5Vulnerability

CVE-2026-114145

### Summary `create_submodule(name, path, url)` clones a submodule into the repo's own `.git` directory before it rejects the path. A `path` of ".git/hooks" is accepted by the pre-clone check, so the submodule is cloned straight into the live hooks directory, and a file named `post-checkout` in the submodule becomes an executable `.git/hooks/post-checkout`. On 3.2.0+ the later index check does raise `ValueError`, but only after the clone already wrote to disk, and it does not remove the planted hook; on 3.1.x there is no such check and the call succeeds silently. Either way the hook runs on the next git operation (e.g. checkout), giving code execution. ### Details The checkout path is validated too late, after the clone has already mutated disk. This breaks the "validate before mutation" invariant that commit 43a43cd8 ("Validate submodule checkout and metadata paths before mutation") set out to enforce. Submodule.add() calls the permissive path check before cloning, and the strict check only reaches the ".git" alias at index time, after _clone_repo has written to disk: git/objects/submodule/base.py (Submodule.add) 599: path = cls._to_relative_path(repo, path) # accepts ".git/hooks" 673: mrepo = cls._clone_repo(repo, url, path, name, ...) # clones into <worktree>/.git/hooks 714: index.add([sm], write=True) # strict check only triggers here git/index/base.py (IndexFile._preprocess_add_items) 732: _validate_repo_path(entry.path) # rejects ".git", too late _to_relative_path only blocks `..`/absolute/out-of-tree paths; `.git` aliases are rejected only by _validate_repo_path, which was added in 3.2.0 (commit a75aedf3) and runs at the index boundary. The ValueError it raises at line 732 does not roll back what _clone_repo already wrote. Version-dependent behavior: - 3.2.0 .. tip bda18e08: _validate_repo_path raises ValueError at index.add, but the hook is already on disk and is not removed (incorrect

Properties

Severity
high
Summary
GitPython validates a submodule's ".git" path only after cloning into it (RCE)
Nvd fetched at
2026-10-22T22:14:18.200859+00:00
Epss score
0.00263
Cvss severity
HIGH
Cvss score
7.5
Retrieved at
2026-10-22T22:17:33+00:00
Ghsa published
2026-10-22T16:41:14Z
Source url
https://github.com/advisories/GHSA-83vg-56qc-22m7
Ghsa updated
2026-10-22T16:41:15Z
Ghsa id
GHSA-83vg-56qc-22m7
Last source
FIRST EPSS
Score
7.5
Cvss version
3.1
Cve id
CVE-2026-114145
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
First seen by Signal
2026-10-21T22:34:38+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Published at
2026-10-21T21:17:57.250

Related Entities (3)

AFFECTS (1)

→[Software]pip/GitPython

HAS_WEAKNESS (1)

VULNERABLE_TO (1)

←[Software]pip/GitPython

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-114145 (CVSS v3.1 7.5) — Ninja Signal Threat Intelligence | Ninja Signal