REDHAT-BUG-2519610: High severity GitPython GitPython vulnerability

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
Data Sourced
via Red Hat·02:18 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using GitPython versions before 3.1.58 are affected when untrusted input can reach crafted keyword arguments passed to guarded methods such as clone_from.

2

Does the default safety setting prevent exploitation?

No. The bypass works with the default allow_unsafe_options=False setting by combining a single-character keyword argument with split_single_char_options=False.

3

What does an attacker need to exploit this vulnerability?

An attacker needs the ability to supply a crafted kwargs dictionary to a guarded GitPython method, such as clone_from. The crafted arguments can cause a joined token to be parsed as --upload-pack and result in arbitrary OS command execution.

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