PT-2026-67305 · Pypi+1 · Gitpython+1

·

CVE-2026-67325

·

Published

2026-07-12

·

Updated

2026-09-10

CVSS v2.0

9.0

High

VectorAV:N/AC:L/Au:S/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions GitPython versions prior to 3.1.51
Description An incomplete command injection blocklist allows attackers to bypass the unsafe options guard. The issue stems from the check unsafe options() function and canonicalize option name() function, which perform exact-match checks and only normalize underscores to hyphens. This fails to account for the long-option prefix abbreviation feature of git, where git accepts any unambiguous prefix of a long option.
Attackers can use abbreviated keys such as upload p (which git resolves to --upload-pack), receive p (resolved to --receive-pack), or exe (resolved to --exec) to bypass the guard and execute arbitrary commands. This occurs even when allow unsafe options is set to False.
Recommendations Update GitPython to version 3.1.51 or later. As a temporary mitigation, restrict the use of attacker-controlled keys in the clone, fetch, pull, and push methods to prevent them from reaching the vulnerable check unsafe options() function.

Exploit

Fix

OS Command Injection

Incomplete List of Disallowed Inputs

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2026-11001
CVE-2026-67325
GHSA-2F96-G7MH-G2HX
GHSA-6R2R-WW24-7H52
OESA-2026-3249
OESA-2026-3250
OESA-2026-3251
OPENSUSE-SU-2026:11466-1
PYSEC-2026-3836
RHSA-2026:44416
RHSA-2026:45785
RHSA-2026:45940

Affected Products

Gitpython
Red Os