KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 16:01 UTC

Back to the wire
Permalink
VulnerabilityGHSA-m64x-33q8-m5h7

GitPython parse_actor_and_date() is vulnerable to quadratic backtracking on malformed identity lines

This is a residual of GHSA-g5vv-9gxw-82hx / CVE-2026-87819. The 3.1.60 fix made `Actor._from_string` regex-free, but `parse_actor_and_date` still runs `_re_actor_epoch` on the same author/committer/tagger line one step earlier.

At a glance

Exploited
Not known
Severity
Not scored yet
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: GitPython: 3.2.0. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-m64x-33q8-m5h7 (opens a new tab)

What happened

### Summary

This is a residual of GHSA-g5vv-9gxw-82hx / CVE-2026-87819. The 3.1.60 fix made `Actor._from_string` regex-free, but `parse_actor_and_date` still runs `_re_actor_epoch` on the same author/committer/tagger line one step earlier. That pattern backtracks quadratically when the trailing epoch or timezone is missing or malformed, so the same class of slow parse is still reachable in 3.1.62.

### Details

`git/objects/util.py:322`:

Continue reading

```python _re_actor_epoch = re.compile(r"^.+? (.*) (\d+) ([+-]\d+).*$") ```

`.+?` and `(.*)` can both absorb the same run of spaces, and the required ` (\d+) ([+-]\d+)` tail is only checked after them. On a long line with no valid tail, the search retries every split point.

It is called from `parse_actor_and_date` (`git/objects/util.py:335`), which runs on the author and committer lines in `Commit._deserialize` (`git/objects/commit.py:917`, `:931`) and on the tagger line in `git/objects/tag.py:129`.

The published payload (letters plus an unterminated ` Tuple[int, int]:

# Precompiled regexes -_re_actor_epoch = re.compile(r"^.+? (.*) (\d+) ([+-]\d+).*$") -_re_only_actor = re.compile(r"^.+? (.*)$") +# The leading field name ("author", "committer", "tagger") is matched with ``.[^ ]*`` rather than +# ``.+?``: both stop at the first space after the first character, but ``.[^ ]*`` cannot overlap the +# following ``(.

*)``, so a line with no valid trailing epoch/offset no longer backtracks quadratically. +_re_actor_epoch = re.compile(r"^.[^ ]* (.*) (\d+) ([+-]\d+).*$") +_re_only_actor = re.compile(r"^.[^ ]* (.*)$")

def parse_actor_and_date(line: str) -> Tuple[Actor, int, int]: diff --git a/test/test_util.py b/test/test_util.py index cf4299d5..e1631420 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -22,6 +22,7 @@ from git.cmd import dashify from git.objects.util import ( altz_to_utctz_str, from_timestamp, + parse_actor_and_date, parse_date, tzoffset, utctz_to_altz, @@ -571,6 +572,30 @@ class TestUtils(TestBase): Actor("name last another", "some-very-long-email@example.com"), )

+ def test_parse_actor_and_date_malformed_line_is_linear(self): + # A long author line whose trailing epoch/offset is missing or malformed used to make + # _re_actor_epoch backtrack quadratically: ~7 s per Commit.author access for a 32 KB line. + # The parse result must be unchanged; only the time spent reaching it should move.

+ for tail in ("", " notanumber -0700", " 1191999972", " -0700", " 1191999972 xx"): + line = "author " + " " * 32000 + tail + start = time.perf_counter() + actor, epoch, offset = parse_actor_and_date(line) + self.assertLess(time.perf_counter() - start, 1.0) + self.assertEqual(epoch, 0) + self.assertEqual(offset, 0) + + # Well-formed lines, including one with a long name, still parse exactly as before.

+ actor, epoch, offset = parse_actor_and_date( + "author Tom Preston-Werner 1191999972 -0700" + ) + self.assertEqual(actor, Actor("Tom Preston-Werner", "tom@mojombo.com")) + self.assertEqual(epoch, 1191999972) + self.assertEqual(offset, 25200) + + actor, epoch, offset = parse_actor_and_date("author " + "a " * 16000 + " 1 -0700") + self.assertEqual(actor.email, "a@b") + self.assertEqual(epoch, 1) + @ddt.

data( ("name", ""), ("name", "prefix_"), ```

Found with AI assistance (Claude) and verified by hand.

Brian Willows

Affected package ranges reported by GitHub: GitPython: <= 3.1.62

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-m64x-33q8-m5h7 (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-m64x-33q8-m5h7, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 27). GitPython parse_actor_and_date() is vulnerable to quadratic backtracking on malformed identity lines. https://kevwire.com/record/GHSA-m64x-33q8-m5h7

MLA

"GitPython parse_actor_and_date() is vulnerable to quadratic backtracking on malformed identity lines." KEVWire, 27 Oct. 2026, kevwire.com/record/GHSA-m64x-33q8-m5h7.

Chicago

KEVWire. "GitPython parse_actor_and_date() is vulnerable to quadratic backtracking on malformed identity lines." Last modified October 27, 2026. https://kevwire.com/record/GHSA-m64x-33q8-m5h7.

Evidence summary (plain text)

GitPython parse_actor_and_date() is vulnerable to quadratic backtracking on malformed identity lines (Oct 27, 2026).
This is a residual of GHSA-g5vv-9gxw-82hx / CVE-2026-87819. The 3.1.60 fix made `Actor._from_string` regex-free, but `parse_actor_and_date` still runs `_re_actor_epoch` on the same author/committer/tagger line one step earlier. That pattern backtracks quadratically when the trailing epoch or timezone is missing or malformed, so the same class of slow parse is still reachable in 3.1.62.

`git/objects/util.py:322`:
Sources:
GitHub-reviewed advisory GHSA-m64x-33q8-m5h7: https://github.com/advisories/GHSA-m64x-33q8-m5h7
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: GHSA-m64x-33q8-m5h7.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 16:00 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail