CVE-2026-67326: Improper Input Validation in gitpython-developers GitPython
GitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), 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.
AI Analysis
Technical Summary
GitPython before version 3.1.50 does not properly validate newline characters in the section parameter of the config_writer() method. This improper input validation allows attackers to inject arbitrary section headers into the .git/config file. By injecting newlines, an attacker can forge a [core] section with a hooksPath pointing to directories under their control. When git hooks execute, this can lead to remote code execution. The vulnerability is classified as high severity with a CVSS 4.0 base score of 7.3, reflecting the potential for local attack vector with high complexity and partial user interaction required.
Potential Impact
Successful exploitation allows an attacker with local access to inject malicious configuration into the .git/config file, specifically forging the [core] section to redirect git hooks to attacker-controlled locations. This can lead to remote code execution when git hooks are triggered, posing a significant risk to system integrity and security.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using untrusted input for the section parameter in config_writer() and restrict local access to trusted users only. Monitor vendor channels for updates regarding an official patch or workaround.
CVE-2026-67326: Improper Input Validation in gitpython-developers GitPython
Description
GitPython before 3.1.50 fails to validate newline characters in the section parameter of config_writer(), 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.
CVSS v4.0
Score 7.3high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
GitPython before version 3.1.50 does not properly validate newline characters in the section parameter of the config_writer() method. This improper input validation allows attackers to inject arbitrary section headers into the .git/config file. By injecting newlines, an attacker can forge a [core] section with a hooksPath pointing to directories under their control. When git hooks execute, this can lead to remote code execution. The vulnerability is classified as high severity with a CVSS 4.0 base score of 7.3, reflecting the potential for local attack vector with high complexity and partial user interaction required.
Potential Impact
Successful exploitation allows an attacker with local access to inject malicious configuration into the .git/config file, specifically forging the [core] section to redirect git hooks to attacker-controlled locations. This can lead to remote code execution when git hooks are triggered, posing a significant risk to system integrity and security.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using untrusted input for the section parameter in config_writer() and restrict local access to trusted users only. Monitor vendor channels for updates regarding an official patch or workaround.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-29T13:07:21.184Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6deb26bf32cb7a34c1fc19
Added to database: 08/01/2026, 12:48:38 UTC
Last enriched: 08/01/2026, 13:04:13 UTC
Last updated: 08/01/2026, 21:20:40 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.