CVE-2026-76220: GitPython before 3.1.58 Command Execution via split_single_char_options

Published Aug 19, 2026
·
Updated

GitPython before 3.1.58 contains a command execution vulnerability in the checkunsafeoptions guard that can be bypassed by combining a single-character kwarg with splitsinglecharoptions=False. Attackers can supply a crafted kwargs dictionary to guarded methods like clonefrom to emit a joined token parsed as --upload-pack, enabling arbitrary OS command execution at default allowunsafeoptions=False.

Affected Software

1 affected component
GitPython GitPython<3.1.58

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade GitPython to a version that resolves this vulnerability.

    Fixed in 3.1.58

Event History

Aug 19, 2026
CVE Published
via MITRE·02:02 PM
Data Sourced
via MITRE·02:02 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

An attacker needs the ability to supply a crafted kwargs dictionary to a GitPython guarded method, such as clone_from. No user interaction is required, but the attacker must have privileges to influence those method arguments.

2

Are default GitPython settings affected?

Yes. The bypass works even when allow_unsafe_options is left at its default value of False, by combining a single-character keyword argument with split_single_char_options=False.

3

What version resolves the issue?

Upgrade GitPython to version 3.1.58 or later. Versions before 3.1.58 are affected according to the advisory information provided.

4

What can be done if an immediate upgrade is not possible?

Do not pass attacker-controlled kwargs to guarded GitPython methods such as clone_from. In particular, prevent callers from controlling split_single_char_options or from supplying crafted single-character option keys that can be joined into unsafe Git options.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203