Cloudanix VulnDB

CVE-2026-67322

High · 7.5

CVSS

7.5

EPSS

0.3%

Published

Aug 1, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in certain versions of a Python library used for working with Git repositories can accidentally send secret values from a program's environment to an attacker when cloning from a specially crafted address.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability allows an attacker-controlled remote URL supplied to Repo.clone_from() to have environment variable tokens expanded via os.path.expandvars() on non-Cygwin platforms before the git clone operation, causing the expanded secret values to be included in the URL transmitted to an attacker-controlled host.

Why it matters to the business

Organizations using affected GitPython packages on Red Hat systems risk disclosure of sensitive environment variables such as cloud credentials or tokens during clone operations, potentially leading to unauthorized access to infrastructure or data.

How an attack unfolds

An attacker supplies a malicious URL containing ${ENV_VAR} tokens to code that calls Repo.clone_from(). On non-Cygwin systems the URL is expanded with values from the calling process environment before the clone is performed, sending the secrets over the network to the attacker.

How to fix it

Upgrade affected Red Hat packages to the fixed versions: llvm21-main to 21.1.8-8.hum1, llvm-main to 22.1.8-4.1.hum1, python3.12-gitpython on el8 to 3.1.59-1.el8ap, python3.12-gitpython on el9 to 3.1.59-1.el9ap, and swift-lang-main to 6.3.3-0.1.1.hum1. Where immediate patching is not possible, avoid passing untrusted URLs to clone_from() and sanitize inputs before use.

How to confirm the fix worked

Verify installed package versions match or exceed the fixed releases listed in RHSA-2026:44416. Test by invoking clone_from() with a URL containing an ${UNSET_VAR} token on a non-Cygwin platform and confirm the token is no longer expanded in the resulting network request.

Typical attack path

  1. Identify application code or dependency that invokes GitPython Repo.clone_from() with a user- or configuration-supplied remote URL.
  2. Craft a URL embedding tokens such as ${AWS_SECRET_ACCESS_KEY} or ${GITHUB_TOKEN}.
  3. Trigger the clone operation so the URL passes through polish_url() and os.path.expandvars().
  4. Receive the expanded URL containing exfiltrated secrets at the attacker-controlled host.

How to detect it

Review application and git process logs for clone URLs containing expanded environment-variable values or unexpected remote hosts. Examine network traffic logs for git clone requests that include credential-like strings in the URL path or query.

What your security team should do

  • Apply the listed Red Hat package updates immediately given the 85-day publication window.
  • Audit all code paths that invoke GitPython clone operations with externally influenced URLs.
  • Add environment-variable scanning or URL sanitization around GitPython usage until upgrades are complete.
  • Monitor network egress for unexpected git clone destinations that may indicate prior exposure.

The record

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.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities