Advisory

PYSEC-2026-3982

Also known as: CVE-2026-87817, GHSA-239g-whfq-7xj9

Summary

The record has no summary.

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-09-09 12:17 UTC
Modified
2026-09-17 09:00 UTC

Affected packages and fixes

gitpython

PyPI · All systems

Affected

  • introduced 0, fixed 3.1.60 (ecosystem)

Fixed versions

3.1.60

Fix

  • Fixed version 3.1.60
    pip install --upgrade gitpython==3.1.60

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences