VDB
Sign up
HIGH7.8

PYSEC-2026-3785

Quick fix

PYSEC-2026-3785 — gitpython: upgrade to the fixed version with the command below.

pip install --upgrade 'gitpython>=3.1.59'

Details

GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/gitpython
Introduced in: 0Fixed in: 3.1.59
Fixpip install --upgrade 'gitpython>=3.1.59'

References