CVE-2026-76221: GitPython before 3.1.58 Config Injection via option-name

Published Aug 19, 2026
·
Updated

GitPython before 3.1.58 contains a config-name injection vulnerability in the option-name validator that allows attackers to forge arbitrary git-config directives by injecting equals signs, hash symbols, and whitespace into option names. Attackers can inject malicious option names like 'sshCommand = touch /tmp/RCE #' to execute arbitrary commands via core.sshCommand or core.hooksPath on the next git operation.

Affected Software

1 affected component
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
  2. Compensating control

    Ensure that untrusted repositories/config files are not used to trigger the vulnerable next Git operation; isolate or avoid running the next GitPython git operation on attacker-controlled inputs until patched.

Event History

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

Frequently Asked Questions

1

What access does an attacker need to exploit this issue?

The CVSS vector indicates low-privileged access is required, while user interaction is not required. Exploitation depends on the attacker being able to supply a malicious Git configuration option name to affected GitPython code.

2

When does injected configuration become dangerous?

The injected directive can cause arbitrary command execution on a subsequent Git operation. Examples in the advisory include configuring core.sshCommand or core.hooksPath through a forged option name.

3

Which versions should be remediated?

GitPython versions before 3.1.58 are affected. Upgrade to 3.1.58 or later.

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