CVE-2026-78679: External Control of File Name or Path in gitpython-developers GitPython
Description
GitPython before 3.1.59 contains an arbitrary file read vulnerability in TagReference.create() where a positional reference parameter bypasses the unsafe option guard. Attackers can supply a reference value like --file=<path> to read arbitrary files, with contents returned in the annotated tag message.
CVSS v4.0
Score 7.1high
Affected software
gitpython-developers
GitPython
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because TagReference.create() forwards a caller-influenced positional 'reference' argument directly to the 'git tag' command without proper inspection by the unsafe-option guard. The prior fix added a denylist for unsafe options like '--file' but only checked keyword arguments, ignoring positional arguments. An attacker can supply '--file=<path>' as the positional 'reference' argument, causing 'git tag' to create an annotated tag whose message contains the contents of the specified local file. This leads to an arbitrary local file read at the privileges of the host process. The issue affects GitPython versions before 3.1.59, as the sink remains unchanged in the latest release. The suggested fix is to include positional arguments in the unsafe option checks or to separate positional arguments with '--' to prevent option injection.
Potential Impact
Allows an attacker with the ability to control the 'reference' positional argument in TagReference.create() to read arbitrary local files on the host system. The file contents are returned in-band as the annotated tag message. This could expose sensitive files such as private keys or configuration files. The attack requires the embedding application to pass user-controlled input to this function, and the process privileges determine the scope of accessible files.
Mitigation Recommendations
No official fix is currently published. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. As a workaround, avoid passing user-controlled input directly to the 'reference' positional argument of TagReference.create(). The suggested fix is to modify GitPython to include positional arguments in the unsafe option checks or to insert a '--' separator before positional arguments in TagReference.create() to prevent option injection.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-08-25T01:17:12.262Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8cf57dacd9273b498428e2
Added to database: 08/25/2026, 01:53:01 UTC
Last enriched: 09/18/2026, 01:52:51 UTC
Last updated: 10/08/2026, 16:24:27 UTC
Views: 104
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.