CVE-2026-110856
Regex DoS in GitPython < 3.2.0 via parse_actor_and_date epoch pattern.
- CVSS 8.7
- CWE-1333
- Input Validation and Sanitization
- Remote
GitPython before 3.2.0 contains a regular expression denial of service vulnerability in the _re_actor_epoch pattern used by parse_actor_and_date on author, committer, and tagger lines. Attackers can serve repositories with commit or tag objects containing long space-filled lines lacking a valid epoch or timezone, causing quadratic backtracking and CPU exhaustion.
- CWE
- CWE-1333
- CVSS base score
- 8.7
- Published
- 2026-10-14
- OWASP
- A04 Insecure Design
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- GitPython
- Fixed by upgrading
- Yes
Solution
Upgrade GitPython to version 3.2.0 or later.
Vulnerable code sample
import re
# Vulnerable regex that catastrophically backtracks on long space‑filled lines
_re_actor_epoch = re.compile(r'\s+(\d+)\s+([+-]\d{4})') # VULNERABLE: catastrophic backtracking
def parse_actor_and_date(line: str):
"""
Extract the epoch timestamp and timezone from an author/committer/tag line.
Expected format: "<name> <email> <epoch> <tz>"
"""
m = _re_actor_epoch.search(line)
if not m:
raise ValueError("Invalid actor line")
epoch = int(m.group(1))
tz = m.group(2)
return epoch, tzPatched code sample
import re
# Use a linear‑time split instead of a backtracking regex
# FIX: avoid catastrophic backtracking by parsing with split
def parse_actor_and_date(line: str):
"""
Extract the epoch timestamp and timezone from an author/committer/tag line.
Expected format: "<name> <email> <epoch> <tz>"
"""
parts = line.rstrip().split()
if len(parts) < 2:
raise ValueError("Invalid actor line")
# The last two parts are epoch and timezone
try:
epoch = int(parts[-2])
except ValueError as e:
raise ValueError("Invalid epoch") from e
tz = parts[-1]
return epoch, tzPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix: bound actor and date parsing (gitpython-developers/GitPython)
git/objects/util.py
Cite this entry
@misc{vaitp:cve2026110856,
title = {{Regex DoS in GitPython < 3.2.0 via parse_actor_and_date epoch pattern.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-110856},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-110856/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
