Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. GitPython
  4. ›
  5. GHSA-f9j4-qggq-h239

GHSA-f9j4-qggq-h239: GitPython Remote.pull() refspec bypasses the --upload-pack unsafe-option guard, enabling arbitrary command execution

October 27, 2026

Remote.pull() in GitPython forwards its positional refspec argument directly to the git pull child process while its unsafe-option guard inspects only keyword arguments. An application that passes attacker-influenced data as the refspec (for example a user-supplied branch or refspec parameter in a web or CI service) can supply an option-shaped value such as --upload-pack=<command>. The value bypasses the unsafe_git_pull_options check, is placed after the -- separator on the git pull command line, and is executed as the upload-pack program for local-path or SSH transports. This yields arbitrary command execution with the privileges of the calling process using the documented default arguments (allow_unsafe_options=False).

References

  • github.com/advisories/GHSA-f9j4-qggq-h239
  • github.com/gitpython-developers/GitPython/commit/790bb3164948625ffb043d2a162425d55923fe9a
  • github.com/gitpython-developers/GitPython/pull/2247
  • github.com/gitpython-developers/GitPython/releases/tag/3.2.0
  • github.com/gitpython-developers/GitPython/security/advisories/GHSA-f9j4-qggq-h239

Code Behaviors & Features

Detect and mitigate GHSA-f9j4-qggq-h239 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.1.30 before 3.2.0

Fixed versions

  • 3.2.0

Solution

Upgrade to version 3.2.0 or above.

Impact 8.1 HIGH

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

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Source file

pypi/GitPython/GHSA-f9j4-qggq-h239.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:17:18 +0000.