Vulnerabilities

Security incident · GHSA-fx3j-rwgx-fr94

GitPython: separate_git_dir leaks env vars via crafted .gitmodules submodule name

Published Oct 27, 2026 · catalog updated Oct 27, 2026 · GitPython: separate_git_dir leaks env

Last checked Oct 27, 2026, 12 days ago.

Open the advisory

Exploitation likelihood is not on this record for GHSA-fx3j-rwgx-fr94. A missing EPSS score is not a low risk. Compare GitPython: separate_git_dir leaks env with the linked advisory before you change production.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (GitPython: separate_git_dir leaks env).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
  • EPSS is missing. A missing score is not a low risk.
Severity
Medium6.5
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
Awaiting synchronization with FIRST
Remediation
Version ranges on file
Affected products
pip GitPython

### Summary 's handling of never disables 's environment-variable expansion, unlike every other caller of that helper that handles attacker-influenced data. Since can be derived from an attacker-controlled submodule name, a completely ordinary + on a malicious repository expands an environment variable of the attacker's choosing and exposes its value both as a persistent on-disk directory name and, whenever DEBUG-level logging is enabled (a common CI/verbose-logging configuration), in a log line that is not redacted the way credential-bearing arguments are. ### Root cause / Details 's has: This is the only remaining call site handling attacker-influenced data that does not pass (there is one other unguarded call site, at line 1537, but its input is the caller's own local destination path, not attacker-controlled). The sibling fixes for / added to (5 lines below this one, in the same function), , , and — this one did not receive it. ( also currently sets at a related call site, but that was added incidentally by a later, unrelated commit, not as part of these security fixes.) 's docstring itself says: "Disable this for values obtained from an untrusted source, such as remote URLs." Its non-Cygwin branch does plain on the entire string, including embedded variables anywhere in an absolute path. reaches from ( ) as , where is the raw submodule section name — fully attacker-controlled content of a cloned repository. (added by the fix for ) only rejects names that are absolute, contain a drive letter, or contain path components; it does not reject . is true for git ≥ 1.7.5, i.e. the default path for virtually every real-world installation. ### Reproduction (live, against real, unmodified GitPython code, no monkeypatching) Built a hostile repository with a plain, ordinary git command: . Set an environment variable in the "victim" process (standing in for a real CI secret such as ): . Then ran the exact ordinary workflow the advisory's own PoC also uses: Observed result (

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • pip GitPython<= 3.1.62

How to fix GHSA-fx3j-rwgx-fr94

  • Upgrade

    GHSA-fx3j-rwgx-fr94 lists a fix boundary at 3.1.62. Compare the installed build with that boundary before you change production.

  • Version check

    Affected <= 3.1.62

  • Official advisories

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

Exploitation likelihood is not on this record for GHSA-fx3j-rwgx-fr94. A missing EPSS score is not a low risk. Compare GitPython: separate_git_dir leaks env with the linked advisory before you change production.

Which versions are affected?

Compare what you have installed with GitPython <= 3.1.62. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-200: Exposure of Sensitive Information. EPSS is not on this record yet. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 27, 2026 · GitHub Advisory Database

    Detected

    ### Summary 's handling of never disables 's environment-variable expansion, unlike every other caller of that helper that handles attacker-influenced data. Since can be derived from an attacker-controlled submodule name, a completely ordinary + on a malicious repository expands an environment variable of the attacker's choosing and exposes its value both as a persistent on-disk directory name and

  2. Oct 27, 2026 · GitHub Advisory Database

    Updated

    ### Summary 's handling of never disables 's environment-variable expansion, unlike every other caller of that helper that handles attacker-influenced data. Since can be derived from an attacker-controlled submodule name, a completely ordinary + on a malicious repository expands an environment variable of the attacker's choosing and exposes its value both as a persistent on-disk directory name and

Sources

References

Freshness

Last verified in this catalog Oct 27, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • GitHub Advisory DatabaseOct 27, 2026