Information Disclosure in gitpython (CVE-2026-67322)
Summary
Vulnerability in gitpython (CVE-2026-67322). Confidential information can be exposed externally. Exploitable via AWS_SECRET_ACCESS_KEY. Mitigation: upgrade to 3.1.52 or later.
Original description
The description as published by the source.
Summary
Repo.clone_from() passes the caller-supplied remote URL through Git.polish_url(), which on every non-Cygwin platform calls os.path.expandvars() on the URL before handing it to git clone. An attacker who controls the URL argument — the documented use case for clone_from() in "import repository from URL" features of CI servers, git-hosting mirrors, and dependency scanners — can embed $NAME / ${NAME} tokens that are expanded server-side to the values of the hosting process's environment variables. The resulting URL, now containing the secret, is transmitted over the network to the attacker-named host. This crosses the trust boundary between an untrusted remote URL and the server's process environment, disclosing secrets such as AWS_SECRET_ACCESS_KEY or GITHUB_TOKEN with no precondition beyond the ability to submit a clone URL.
Details
Affected versions: gitpython (PyPI) — all releases up to and including 3.1.50 (latest at time of reporting); confirmed present on the main branch.
Git.polish_url() unconditionally applies environment-variable expansion to its input on the non-Cygwin branch:
git/cmd.py (v3.1.50), lines 907–925:
@classmethod
def polish_url(cls, url: str, is_cygwin: Union[None, bool] = None) -> PathLike:
"""Remove any backslashes from URLs to be written in config files.
...
"""
if is_cygwin is None:
is_cygwin = cls.is_cygwin()
if is_cygwin:
url = cygpath(url)
else:…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-67322 has been found in gitpython.
Attackers can target a specific entry point like AWS_SECRET_ACCESS_KEY over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 7.5/10.
What to do: upgrade gitpython to 3.1.52 or later.
If unsure, ask your IT team or search "gitpython CVE-2026-67322" on the vendor's site.
CVE-2026-67322 (gitpython) — CWE-200 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: AWS_SECRET_ACCESS_KEY / GITHUB_TOKEN / gitpython / main
Patched: 3.1.52 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Information disclosure (CWE-200) exists in gitpython. Attackers reach the vulnerable code path via AWS_SECRET_ACCESS_KEY without authentication.
Check the vendor advisory for the affected versions of gitpython. Attack surface: AWS_SECRET_ACCESS_KEY / GITHUB_TOKEN / gitpython / main.
Severity: High (CVSS 7.5/10). Confidential information can be exposed externally.
Update to 3.1.52.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'gitpython' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'gitpython' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
gitpythonを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade gitpython to 3.1.52ステージング環境で 3.1.52 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Ubuntu UBUNTU-CVE-2026-67322 python-git
References
- web github.com
- web vulncheck.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web pypi.org