Bug 2531404

Summary: CVE-2026-87817 GitPython: GitPython: Remote Code Execution via Git directory impersonation [fedora-all]
Product: [Fedora] Fedora Reporter: Marian Rehak <mrehak>
Component: GitPythonAssignee: Lubomír Sedlář <lsedlar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: athoscribeiro, carlwgeorge, code, igor.raits, lsedlar
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["28df6985-49b4-4ad7-87c7-751b0082d918"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-09-10 18:53:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2530744    

Description Marian Rehak 2026-09-10 11:39:35 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

GitPython before 3.1.60 fails to properly validate the git directory location, allowing attackers to impersonate the git directory using tracked files like gitdir, commondir, and HEAD. Attackers can execute arbitrary code by placing a malicious pre-commit hook in the tracked hooks directory that executes when a victim calls index.commit() on a cloned or opened repository.

Comment 1 Ben Beasley 2026-09-10 18:53:21 UTC
This is fixed in 3.1.60, which is already in all Fedora branches, EPEL10, and EPEL9. EPEL8 is at an old version affected by (at this point) dozens of known security issues, but can’t be straightforwardly updated.