Safeguard
Vulnerability Analysis•

CVE-2026-78675: High Local File Disclosure in GitPython

CVE-2026-78675: GitPython before 3.1.59 follows include directives in .gitmodules and can leak the first line of local files. Upgrade to 3.1.59.

Safeguard Security Team
3 min read

CVE-2026-78675 is a high severity (CVSS 8.4 in the record) flaw in GitPython. Versions before 3.1.59 follow include directives when parsing a .gitmodules file, which can disclose local file content through an error message. The fix is to upgrade to GitPython 3.1.59 or later.

What's affected

  • GitPython 3.1.58 and earlier. The GitHub advisory lists affected versions as 3.1.58 or lower, and VulnCheck lists anything below 3.1.59.
  • Patched in GitPython 3.1.59.
  • The weak path is reading submodule configuration, for example through repo.submodules, on a repository you do not trust.

Record severity: CVSS 8.4 (high), vector CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The weakness class is CWE-73, External Control of File Name or Path.

Source note: Severity differs by source. The NVD style record carries CVSS 8.4 with a high rating. GitHub rates the advisory High, and VulnCheck lists CVSS v4 8.6. All agree on high; use your own scoring policy for priority.

How to check if you're exposed

Run pip show GitPython in each environment and read the Version line. To find it across a project, run pip list or pip freeze | grep -i gitpython, and check lock files for a pinned version. Remember transitive installs: tools that wrap GitPython bring it along. Paste a lock file into the free dependency scanner at gold.safeguard.sh/scan to see all matches.

What to do now

  1. Search every Python environment, container image and lock file for GitPython.
  2. Upgrade with pip install -U "GitPython>=3.1.59" and update pinned requirements.
  3. Rebuild container images and CI runners that bundle the library.
  4. Treat repositories from outside parties as untrusted input in any automation that reads submodules.
  5. Run a reachability check to see whether your code calls submodule parsing at all.

Why it matters

The weakness is external control of a file path (CWE-73). Git config files can include other files, and GitPython parsed .gitmodules with that include feature switched on. A hostile repository could point an include at a sensitive local file, and the parser error message then repeated the first line of that file. The maintainers had already turned includes off for config writers, and this fix applies the same idea to submodule parsing.

Exposure is highest in services that clone or inspect repositories supplied by users, such as code review bots and build tooling. The record does not say the issue is exploited in the wild.

Try it yourself

Click through it at your own pace, or open it full screen.

Quick check

Which versions of GitPython are fixed?

3.1.59 and later.

What leaks?

The advisory describes disclosure of the first line of a targeted file through an error message, not full file contents.

Sources

To see where this and other CVEs sit in your own dependencies, try the free in-browser scan at gold.safeguard.sh/scan.

Last reviewed: 18 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.