Skip to content
Heist/ feed
HighFix available

python-GitPython security update

Type: advisorySource: OSV1 source record

**GitPython*is a python library used to interact with Git repositories.GitPython provides object model read and write access to your git repository. Access repository information conveniently, alter the index directly, handle remotes, or go down to low-level object database access with big-files support.With the new object database abstraction added in 0.3, its even possible to implement your own storage mechanisms, the currently available implementations are 'cgit' and pure python, which is the default.Documentation The latest documentation can be found here: As this version of GitPython depends on GitDB, which in turn needs smmap to work, installation is a bit more involved if you do a manual installation, instead of using pip. Security Fix(es): 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.(CVE-2026-87817) GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets thro

Announced Source revision 1
Original source ↗

OESA-2026-4026

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:OESA-2026-4026

python-GitPython

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
3.1.59-2.oe2403sp3

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "3.1.59-2.oe2403sp3"
          }
        ]
      }
    ],
    "package": {
      "name": "python-GitPython",
      "purl": "pkg:rpm/openEuler/python-GitPython&distro=openEuler-24.03-LTS-SP3",
      "ecosystem": "openEuler:24.03-LTS-SP3"
    },
    "database_specific": {
      "source": "https://repo.openeuler.org/security/data/osv/OESA-2026-4026.json"
    },
    "ecosystem_specific": {
      "src": [
        "python-GitPython-3.1.59-2.oe2403sp3.src.rpm"
      ],
      "noarch": [
        "python-GitPython-help-3.1.59-2.oe2403sp3.noarch.rpm",
        "python3-GitPython-3.1.59-2.oe2403sp3.noarch.rpm"
      ]
    }
  }
]

Publisher severity

high

Source reference: /database_specific/severity

Event
#14668 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement