---
id: CVE-2026-67322
title: >-
  GitPython before 3.1.52 is vulnerable to environment-variable exfiltration in
  Repo.clone_from()
summary: >-
  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 befor…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-200
  - CWE-214
  - CWE-201
published: '2026-08-01'
updated: '2026-08-01'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-67322'
references:
  - url: >-
      https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-rwj8-pgh3-r573
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/gitpython-before-environment-variable-exfiltration-via-clone-from
    label: disclosure@vulncheck.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-67322.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-67322'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2510021'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-67322'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-67322'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59135'
  - url: 'https://access.redhat.com/errata/RHSA-2026:59136'
  - url: 'https://access.redhat.com/errata/RHSA-2026:44416'
  - url: 'https://access.redhat.com/errata/RHSA-2026:45940'
  - url: 'https://access.redhat.com/errata/RHSA-2026:45785'
  - url: 'https://access.redhat.com/errata/RHSA-2026:63372'
  - url: 'https://access.redhat.com/errata/RHSA-2026:63334'
  - url: 'https://access.redhat.com/errata/RHSA-2026:63354'
  - url: 'https://access.redhat.com/errata/RHSA-2026:63337'
  - url: 'https://github.com/gitpython-developers/GitPython/pull/2172'
  - url: >-
      https://github.com/gitpython-developers/GitPython/commit/8ac5a30519b6f4af85398b9b9d7064ff4d452da2
  - url: 'https://github.com/gitpython-developers/GitPython/releases/tag/3.1.52'
  - url: 'https://github.com/advisories/GHSA-rwj8-pgh3-r573'
  - url: 'https://github.com/gitpython-developers/GitPython'
  - url: 'https://access.redhat.com/errata/RHSA-2026:65126'
  - url: 'https://pypi.org/project/gitpython'
  - url: 'https://access.redhat.com/errata/RHSA-2026:67279'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71114'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71113'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71210'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71179'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3842.yaml
tags:
  - nvd
  - csaf
  - vex
  - red-hat
  - ghsa
  - pip
  - osv
ingestedAt: '2026-08-02T07:18:02.139Z'
epss: 0.00275
epssPercentile: 0.2014
vendor: Red Hat
product: Red Hat OpenShift AI (RHOAI)
affected:
  - exploit_intelligence
  - migration_toolkit_for_applications 8
  - ai_inference_server
  - ansible_automation_platform 2
  - enterprise_linux_ai_rhel_ai 3
  - openshift_ai_rhoai
  - ansible_automation_platform_2_5_for_rhel 8
  - ansible_automation_platform_2_5_for_rhel 9
  - ansible_automation_platform_2_6_for_rhel 9
  - hardened_images
  - satellite 6.18
  - satellite 6.19
patched:
  - ansible_automation_platform_2_5_for_rhel 8
  - ansible_automation_platform_2_5_for_rhel 9
  - ansible_automation_platform_2_6_for_rhel 9
  - hardened_images
  - satellite 6.18
  - satellite 6.19
aliases:
  - GHSA-rwj8-pgh3-r573
  - PYSEC-2026-3842
ecosystem: pip
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **RHSA-2026:59135** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.5 for RHEL 8, Red Hat Ansible Automation Platform 2.5 for RHEL 9 · released 2026-08-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:59135)
- **RHSA-2026:59136** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.6 for RHEL 9 · released 2026-08-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:59136)
- **RHSA-2026:44416** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-23 · [advisory](https://access.redhat.com/errata/RHSA-2026:44416)
- **RHSA-2026:45940** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-26 · [advisory](https://access.redhat.com/errata/RHSA-2026:45940)
- **RHSA-2026:45785** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-25 · [advisory](https://access.redhat.com/errata/RHSA-2026:45785)
- **RHSA-2026:63372** · Red Hat · fixed in: Red Hat Satellite 6.18 · released 2026-09-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:63372)
- **RHSA-2026:63334** · Red Hat · fixed in: Red Hat Satellite 6.18 · released 2026-09-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:63334)
- **RHSA-2026:63354** · Red Hat · fixed in: Red Hat Satellite 6.19 · released 2026-09-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:63354)
- **RHSA-2026:63337** · Red Hat · fixed in: Red Hat Satellite 6.19 · released 2026-09-03 · [advisory](https://access.redhat.com/errata/RHSA-2026:63337)
- **Red Hat VEX** · Important · affected: Exploit Intelligence, Migration Toolkit for Applications 8, Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Red Hat Enterprise Linux AI (RHEL AI) 3, Red Hat OpenShift AI (RHOAI) · no fix planned: Red Hat AI Inference Server, Red Hat Ansible Automation Platform 2, Exploit Intelligence, Migration Toolkit for Applications 8, … · updated 2026-09-24 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-67322.json)
- **RHSA-2026:65126** · Red Hat · fixed in: Red Hat OpenShift AI 2.25 · released 2026-09-08 · [advisory](https://access.redhat.com/errata/RHSA-2026:65126)
- **RHSA-2026:67279** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.7 · released 2026-09-14 · [advisory](https://access.redhat.com/errata/RHSA-2026:67279)
- **RHSA-2026:71114** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.5 for RHEL 8, Red Hat Ansible Automation Platform 2.5 for RHEL 9 · released 2026-09-23 · [advisory](https://access.redhat.com/errata/RHSA-2026:71114)
- **RHSA-2026:71113** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.6 for RHEL 9 · released 2026-09-23 · [advisory](https://access.redhat.com/errata/RHSA-2026:71113)
- **RHSA-2026:71210** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.5 · released 2026-09-23 · [advisory](https://access.redhat.com/errata/RHSA-2026:71210)
- **RHSA-2026:71179** · Red Hat · fixed in: Red Hat Ansible Automation Platform 2.6 · released 2026-09-23 · [advisory](https://access.redhat.com/errata/RHSA-2026:71179)

## Package advisory (CVE-2026-67322)

Affected packages:

- `gitpython <= 3.1.51`

Patched in:

- `gitpython 3.1.52`

Source: https://github.com/advisories/GHSA-rwj8-pgh3-r573
