Sceawere
Vulnerability Detail
CVE-2026-73622UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
GitPython Environment Variable Expansion Vulnerability
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 7.5
- Creation Date
- 9h ago
- Vendor
- gitpython-developers
- Product
- GitPython
- Attack Type
- Exposure of Sensitive Information to an Unauthorized Actor
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack Complexity
- LOW
Narrative and Response
Description
GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "7.5",
"pubDate": "2026-08-13T12:17:27.337Z",
"pubdate": "2026-08-13T12:17:27.337Z",
"executiveSummary": "An environment variable expansion vulnerability exists in GitPython before 3.1.55 within the URL handling mechanisms of Remote.create() and Submodule.add(). This flaw enables threat actors to exfiltrate sensitive secrets by supplying malicious repository URLs containing environment variable references. The primary impact is the unauthorized exposure of confidential system environment variables, which are persistently written into configuration files such as .git/config and .gitmodules. Once injected, these variables are subsequently transmitted to attacker-controlled remote hosts during standard git fetch or pull operations. The affected systems include any software utilizing vulnerable versions of the GitPython library to programmatically manage remote repositories or submodules. The risk implication is severe data leakage, potentially compromising API keys, credentials, or internal tokens accessible via the host environment. Attackers require the capability to influence or supply URL parameters passed to the vulnerable functions, often achieved by tricking users into cloning untrusted repositories or processing maliciously crafted inputs. No advanced authentication or high-level privileges are inherently required to trigger the vector beyond interacting with the vulnerable API methods.",
"technicalDetails": "The vulnerability stems from the failure of GitPython to properly sanitize and disable environment variable expansion during the processing of repository URLs within the Remote.create() and Submodule.add() functions. When processing these URLs, the underlying implementation does not restrict shell-style or format-string variable expansions, allowing tokens referencing environment variables to be embedded directly into the target string parameters. The root cause is the lack of strict input validation and configuration hardening within the URL parsing and configuration-writing logic of the affected components. Attackers exploit this flaw by crafting malicious repository URLs that incorporate specific environment variable tokens. When a developer or automated process invokes Remote.create() or Submodule.add() with these crafted URLs, GitPython writes the unparsed variable references into local repository configuration files, specifically .git/config and .gitmodules. Subsequently, when a fetch or pull operation is executed against the malicious remote, the expanded values of the environment variables are transmitted to the attacker-controlled server as part of the network request. The vulnerable components are explicitly the Remote.create() and Submodule.add() methods found in GitPython prior to version 3.1.55. The attack flow involves the following sequential steps: first, the attacker crafts a URL containing environment variable tokens; second, the attacker induces the target application or user to pass this URL into Remote.create() or Submodule.add(); third, GitPython writes the configuration containing the variable references to .git/config or .gitmodules; fourth, during a subsequent fetch or pull operation, the environment variables are resolved and exfiltrated to the remote endpoint controlled by the attacker. This mechanism requires no special network exposure or privilege escalation within the local environment, relying entirely on the standard execution flow of the library interacting with external repositories."
}