Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GitPython: Environment-variable exfiltration via Repo.create_remote() / Remote.add() URL (incomplete fix of GHSA-rwj8-pgh3-r573)

0
High
Published: 07/24/2026 (07/24/2026, 21:45:16 UTC)
Source: GCVE Database
Product: GitPython

Description

GitPython versions prior to 3.1.55 contain a vulnerability where environment variables in URLs passed to Repo.create_remote() or Remote.add() are expanded and embedded into the repository configuration. This occurs because the fix for a prior vulnerability did not cover these API calls, leaving the default behavior to expand environment variables in URLs. As a result, sensitive environment secrets can be exfiltrated by embedding them in URLs that are stored in .git/config and transmitted to attacker-controlled hosts during fetch or pull operations.

CVSS v3.1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

PyPIghsa
GitPython
Affected versions
<3.1.55

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

AILast updated: 07/25/2026, 23:53:02 UTC

Technical Analysis

The vulnerability arises from the Git.polish_url() method's default behavior of expanding environment variables in URLs (expand_vars=True). While the prior fix disabled this expansion for Repo.clone_from(), it did not update Repo.create_remote() or Remote.add(), which still expand variables in attacker-controlled URLs. An attacker can supply a URL containing environment variable references (e.g., ${AWS_SECRET_ACCESS_KEY}), which are expanded on the server side and stored in the repository's .git/config file. Subsequent fetch or pull operations transmit the expanded secret to the attacker's server. The check for unsafe protocols occurs after expansion and does not block HTTPS URLs carrying secrets. This issue affects GitPython versions before 3.1.55.

Potential Impact

Sensitive environment variables from the hosting process can be exposed to an attacker by embedding them in URLs passed to Repo.create_remote() or Remote.add(). These secrets are written into the repository configuration and transmitted over the network during Git fetch or pull operations, leading to confidentiality breaches. There is no impact on integrity or availability reported.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid using Repo.create_remote() or Remote.add() with untrusted URLs containing environment variable expansions. Monitor GitPython releases for updates that disable environment variable expansion in these API calls, similar to the fix applied to Repo.clone_from().

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-94p4-4cq8-9g67
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6542259c2644c7f8089cfa

Added to database: 07/25/2026, 23:09:25 UTC

Last enriched: 07/25/2026, 23:53:02 UTC

Last updated: 07/26/2026, 03:54:41 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses