External Control of File Name or Path Affecting gitpython package, versions [,3.1.59)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.12% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-GITPYTHON-19256803
  • published25 Aug 2026
  • disclosed25 Aug 2026
  • creditPig-Tail

Introduced: 25 Aug 2026

NewCVE-2026-78675  (opens in a new tab)
CWE-73  (opens in a new tab)

How to fix?

Upgrade GitPython to version 3.1.59 or higher.

Overview

GitPython is a python library used to interact with Git repositories

Affected versions of this package are vulnerable to External Control of File Name or Path through the Submodule._config_parser() path in git/objects/submodule/base.py. An attacker can disclose the first line of a readable local file by supplying a malicious .gitmodules file with an [include] directive and triggering normal submodule enumeration, such as repo.submodules. The parser used for .gitmodules inherits include merging, so it follows attacker-controlled include paths during read-only processing. If the included target is not valid git-config, parsing fails with an exception that can expose the file’s contents through the error message, breaking tools that inspect untrusted repositories.

Workarounds

  • Disable or avoid processing untrusted repositories’ submodule metadata with GitPython operations such as repo.submodules / Submodule.iter_items() / Submodule.config() until the library is upgraded, so attacker-controlled .gitmodules files cannot trigger include parsing against local files.

CVSS Base Scores

version 4.0
version 3.1