GitPython: Three Vulnerabilities Including RCE and ReDoS Disclosed Together
Key findings • Three GitPython vulnerabilities disclosed on September 9, 2026, including two High severity flaws. • CVE-2026-87817 allows arbitrary code execution by impersonating the git dir…

Key findings
- Three GitPython vulnerabilities disclosed on September 9, 2026, including two High severity flaws.
- CVE-2026-87817 allows arbitrary code execution by impersonating the git directory.
- CVE-2026-87819 is a ReDoS vulnerability in commit author processing.
- CVE-2026-87818 permits arbitrary file reads via the diff API.
- All issues are fixed in GitPython version 3.1.60.
On September 9, 2026, three vulnerabilities were disclosed in the GitPython library, a popular Python package for interacting with Git repositories. The disclosures, all occurring within minutes of each other, highlight potential security risks for developers relying on this library for Git operations. The vulnerabilities span denial-of-service, arbitrary file read, and arbitrary code execution.
One of the most critical issues, CVE-2026-87817, carries a High severity rating with a CVSSv3 score of 8.8. This vulnerability stems from GitPython's failure to properly validate the git directory location. Attackers can exploit this by impersonating the git directory using tracked files such as gitdir, commondir, and HEAD. This allows for the potential execution of arbitrary code if a malicious pre-commit hook is placed in the tracked hooks directory, which would then execute when a victim interacts with the repository.
Another High severity vulnerability, CVE-2026-87819 (CVSSv3 7.5), is a regular expression denial-of-service (ReDoS) flaw in the Actor.name_email_regex component. This regex is used to process commit author and committer fields. An attacker can craft a commit object with a malformed author field, specifically one containing an unterminated angle bracket. This malformation triggers quadratic backtracking in the regex engine, leading to excessive CPU consumption and a denial-of-service condition.
The third vulnerability, CVE-2026-87818, is rated Medium with a CVSSv3 score of 6.5. This flaw exists in GitPython version 3.1.59 due to insufficient restrictions on the --no-index option within the high-level diff API. This oversight allows attackers to read arbitrary filesystem paths when they are provided as repository operands. By combining --no-index with the -I or --ignore-matching-lines options, attackers can construct a content-dependent Boolean oracle. This oracle can be repeatedly queried against local files, enabling the gradual recovery of sensitive file contents.
These vulnerabilities were patched in GitPython version 3.1.60. Developers using GitPython are strongly advised to update to the latest version to mitigate these security risks. The timely disclosure and patching of these issues are crucial for maintaining the security posture of projects that integrate GitPython for their version control operations.
The coordinated disclosure of these three vulnerabilities underscores the importance of keeping development tools and libraries up-to-date. Users of GitPython should prioritize updating to version 3.1.60 to protect against potential exploitation of these flaws.
The vulnerabilities disclosed are:
- CVE-2026-87817: Arbitrary code execution via git directory impersonation.
- CVE-2026-87819: Regular expression denial-of-service in commit author processing.
- CVE-2026-87818: Arbitrary file read via improper handling of the --no-index option in diff API.
All identified vulnerabilities have been addressed in GitPython version 3.1.60.
The coordinated disclosure of these three vulnerabilities underscores the importance of keeping development tools and libraries up-to-date. Users of GitPython should prioritize updating to version 3.1.60 to protect against potential exploitation of these flaws.
The vulnerabilities disclosed are:
- CVE-2026-87817: Arbitrary code execution via git directory impersonation.
- CVE-2026-87819: Regular expression denial-of-service in commit author processing.
- CVE-2026-87818: Arbitrary file read via improper handling of the --no-index option in diff API.
All identified vulnerabilities have been addressed in GitPython version 3.1.60.