CVE-2026-73624: GitPython Arbitrary File Overwrite Vulnerability

gitpython Updated 29 Sep 2026

Summary

13/08/2026
Yes i
Unrated
Not published

CVE-2026-73624: GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Affects gitpython versions < 3.1.54. Fixed in 3.1.54. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

GitPython is a Python library that provides an interface to Git repositories, allowing users to interact with Git repositories programmatically. It is widely used for automating Git tasks and integrating Git functionalities into Python applications. The library supports various Git operations, making it a valuable tool for developers. However, certain versions of GitPython are vulnerable to an arbitrary file overwrite issue, which can lead to severe security risks if exploited.

Vulnerability Detail

GitPython versions prior to 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method. This vulnerability arises from the failure to validate git options passed through keyword arguments (kwargs). Attackers can exploit this flaw by supplying the --output argument through the other parameter or output kwarg, allowing them to write patch content to file paths of their choosing at the process privilege level. This can lead to unauthorized file modifications and potential system compromise.

How To Fix

Latest published version: 3.2.1 as of 23 Oct 2026

pip install --upgrade "gitpython==3.2.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.1.54

This is the first release that contains the fix.

pip install --upgrade "gitpython==3.1.54"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the Diffable.diff method with untrusted input. Ensure that any git options passed through kwargs are validated and sanitized to prevent potential exploitation.

Conclusion

In summary, CVE-2026-73624 represents a significant security vulnerability in GitPython that can lead to arbitrary file overwrites. It is crucial for users of affected versions to update to version 3.1.54 or later to protect their applications from potential exploitation. Additionally, implementing input validation can serve as a temporary measure until an update can be applied.

See every vulnerability recorded for gitpython →

Share this vulnerability

FAQ

CVE-2026-73624 is a vulnerability identifier for an arbitrary file overwrite issue found in GitPython versions before 3.1.54.

If exploited, this vulnerability can allow attackers to overwrite files on your system, potentially leading to data loss or unauthorized access.

GitPython versions prior to 3.1.54 are affected by this vulnerability.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors and alerts for open-source vulnerabilities without requiring installation.

If an immediate update is not possible, ensure that you validate and sanitize any input passed to the Diffable.diff method to mitigate the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for gitpython.

How To Fix

Latest published version: 3.2.1 as of 23 Oct 2026

pip install --upgrade "gitpython==3.2.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.1.54

This is the first release that contains the fix.

pip install --upgrade "gitpython==3.1.54"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback