GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.
Fix
Patch, vendor advisory and mitigation references on NVD 3
- https://github.com/gitpython-developers/GitPython/commit/8ac5a30519b6f4af85398b9b9d7064ff4d452da2 Patch
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-94p4-4cq8-9g67 Exploit, Vendor Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-94p4-4cq8-9g67 Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 8.7 · gitpython_projectNVD modified 2026-10-23 18:10
Affected (CPE criteria) 1
cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:*
References 4
- https://github.com/gitpython-developers/GitPython/commit/8ac5a30519b6f4af85398b9b9d7064ff4d452da2 Patch
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-94p4-4cq8-9g67 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/gitpython-before-environment-variable-exfiltration-via-remote-add Third Party Advisory
- https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-94p4-4cq8-9g67 Exploit, Vendor Advisory