CVE-2026-67322: Exposure of Sensitive Information to an Unauthorized Actor in gitpython-developers GitPython
GitPython before 3.1.52 is vulnerable to environment-variable exfiltration in Repo.clone_from(). The caller-supplied remote URL is passed through Git.polish_url(), which on non-Cygwin platforms calls os.path.expandvars() on the URL before invoking git clone. An attacker who controls the clone URL can embed $NAME or ${NAME} tokens that are expanded to the values of the hosting process's environment variables (e.g., AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN). The resulting URL, now containing the secret, is transmitted over the network to an attacker-controlled host during the clone attempt, disclosing the secret.
AI Analysis
Technical Summary
GitPython before version 3.1.52 is vulnerable to environment-variable exfiltration during repository cloning. The vulnerability arises because the clone URL is passed through Git.polish_url(), which calls os.path.expandvars() on the URL on non-Cygwin platforms. This causes any environment variable tokens (e.g., $NAME or ${NAME}) embedded in the URL to be expanded to their actual values from the hosting process's environment. If an attacker controls the clone URL, they can craft it to include such tokens, causing sensitive environment variables like AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN to be included in the URL. This expanded URL is then transmitted over the network to an attacker-controlled host during the clone operation, resulting in the disclosure of secrets.
Potential Impact
An attacker who can control the clone URL can cause sensitive environment variables from the victim's environment to be disclosed over the network. This can lead to the exposure of critical secrets such as cloud service keys or personal access tokens, potentially enabling unauthorized access to other systems or services.
Mitigation Recommendations
A patch is available for this vulnerability in GitPython version 3.1.52. Users should upgrade to version 3.1.52 or later to remediate this issue. Since this is a cloud service environment, the vendor manages remediation for the cloud-hosted service; users should verify with the vendor that their environment is updated accordingly. Until patched, avoid cloning from untrusted or attacker-controlled URLs that could embed environment variable tokens.
CVE-2026-67322: Exposure of Sensitive Information to an Unauthorized Actor in gitpython-developers GitPython
Description
GitPython before 3.1.52 is vulnerable to environment-variable exfiltration in Repo.clone_from(). The caller-supplied remote URL is passed through Git.polish_url(), which on non-Cygwin platforms calls os.path.expandvars() on the URL before invoking git clone. An attacker who controls the clone URL can embed $NAME or ${NAME} tokens that are expanded to the values of the hosting process's environment variables (e.g., AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN). The resulting URL, now containing the secret, is transmitted over the network to an attacker-controlled host during the clone attempt, disclosing the secret.
CVSS v4.0
Score 8.7high
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
GitPython before version 3.1.52 is vulnerable to environment-variable exfiltration during repository cloning. The vulnerability arises because the clone URL is passed through Git.polish_url(), which calls os.path.expandvars() on the URL on non-Cygwin platforms. This causes any environment variable tokens (e.g., $NAME or ${NAME}) embedded in the URL to be expanded to their actual values from the hosting process's environment. If an attacker controls the clone URL, they can craft it to include such tokens, causing sensitive environment variables like AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN to be included in the URL. This expanded URL is then transmitted over the network to an attacker-controlled host during the clone operation, resulting in the disclosure of secrets.
Potential Impact
An attacker who can control the clone URL can cause sensitive environment variables from the victim's environment to be disclosed over the network. This can lead to the exposure of critical secrets such as cloud service keys or personal access tokens, potentially enabling unauthorized access to other systems or services.
Mitigation Recommendations
A patch is available for this vulnerability in GitPython version 3.1.52. Users should upgrade to version 3.1.52 or later to remediate this issue. Since this is a cloud service environment, the vendor manages remediation for the cloud-hosted service; users should verify with the vendor that their environment is updated accordingly. Until patched, avoid cloning from untrusted or attacker-controlled URLs that could embed environment variable tokens.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-29T13:07:21.183Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Is Cloud Service
- true
Threat ID: 6a6deb26bf32cb7a34c1fc09
Added to database: 08/01/2026, 12:48:38 UTC
Last enriched: 08/16/2026, 13:42:16 UTC
Last updated: 09/10/2026, 19:56:14 UTC
Views: 45
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.