CVE-2026-67326: GitPython before 3.1.50 Newline Injection via config_writer section

Published Aug 1, 2026
·
Updated

GitPython before 3.1.50 fails to validate newline characters in the section parameter of configwriter(), allowing attackers to inject arbitrary section headers into .git/config. Attackers can inject newlines to create a forged [core] section with hooksPath pointing to attacker-controlled directories, achieving remote code execution when git hooks are triggered.

Affected Software

1 affected component
GitPython GitPython<3.1.50

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.50
  2. Compensating control

    Restrict which users/services can trigger Git hook execution (e.g., limit access to repositories/hooks execution paths) until GitPython is upgraded.

Event History

Aug 1, 2026
CVE Published
via MITRE·12:22 PM
Data Sourced
via MITRE·12:22 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:17 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-67326?

The severity of CVE-2026-67326 is rated high with a score of 7.

2

How do I fix CVE-2026-67326?

To fix CVE-2026-67326, upgrade GitPython to version 3.1.50 or later.

3

What type of vulnerability is CVE-2026-67326?

CVE-2026-67326 is an input validation vulnerability due to failure in validating newline characters.

4

What can attackers do with CVE-2026-67326?

Attackers can exploit CVE-2026-67326 to inject arbitrary section headers into .git/config.

5

Which software versions are affected by CVE-2026-67326?

GitPython versions before 3.1.50 are affected by CVE-2026-67326.

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