CVE-2026-44244: CWE-94: Improper Control of Generation of Code ('Code Injection') in gitpython-developers GitPython
GitPython versions prior to 3. 1. 49 contain a code injection vulnerability in the GitConfigParser. set_value() method. This method fails to validate newline characters in configuration values, allowing an attacker to inject a crafted core. hooksPath configuration. Because Git accepts indented section headers, this injected configuration causes Git operations that invoke hooks (such as commit, merge, or checkout) to execute scripts from an attacker-controlled path. This vulnerability has been patched in GitPython version 3. 1. 49.
AI Analysis
Technical Summary
GitPython is a Python library for interacting with Git repositories. In versions before 3.1.49, the set_value() function in GitConfigParser does not properly validate values for newline characters. Although GitPython attempts to sanitize newlines by converting them into indented continuation lines, Git itself treats indented [core] stanzas as valid section headers. This allows an attacker to inject a malicious core.hooksPath configuration, redirecting Git hook execution to attacker-controlled scripts during Git operations that trigger hooks. The vulnerability is identified as CWE-94 (Improper Control of Generation of Code) and has a CVSS 3.1 score of 7.8 (high severity). The issue is fixed in GitPython version 3.1.49.
Potential Impact
Successful exploitation allows an attacker with local access and limited privileges to execute arbitrary code by injecting a malicious hooksPath configuration. This can lead to full compromise of the affected system during Git operations that invoke hooks, impacting confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade GitPython to version 3.1.49 or later, where this vulnerability is patched. No other mitigations are documented. Patch status is not explicitly stated in the vendor advisory content, but the description confirms the issue is fixed in version 3.1.49.
CVE-2026-44244: CWE-94: Improper Control of Generation of Code ('Code Injection') in gitpython-developers GitPython
Description
GitPython versions prior to 3. 1. 49 contain a code injection vulnerability in the GitConfigParser. set_value() method. This method fails to validate newline characters in configuration values, allowing an attacker to inject a crafted core. hooksPath configuration. Because Git accepts indented section headers, this injected configuration causes Git operations that invoke hooks (such as commit, merge, or checkout) to execute scripts from an attacker-controlled path. This vulnerability has been patched in GitPython version 3. 1. 49.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
GitPython is a Python library for interacting with Git repositories. In versions before 3.1.49, the set_value() function in GitConfigParser does not properly validate values for newline characters. Although GitPython attempts to sanitize newlines by converting them into indented continuation lines, Git itself treats indented [core] stanzas as valid section headers. This allows an attacker to inject a malicious core.hooksPath configuration, redirecting Git hook execution to attacker-controlled scripts during Git operations that trigger hooks. The vulnerability is identified as CWE-94 (Improper Control of Generation of Code) and has a CVSS 3.1 score of 7.8 (high severity). The issue is fixed in GitPython version 3.1.49.
Potential Impact
Successful exploitation allows an attacker with local access and limited privileges to execute arbitrary code by injecting a malicious hooksPath configuration. This can lead to full compromise of the affected system during Git operations that invoke hooks, impacting confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade GitPython to version 3.1.49 or later, where this vulnerability is patched. No other mitigations are documented. Patch status is not explicitly stated in the vendor advisory content, but the description confirms the issue is fixed in version 3.1.49.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-05T16:33:55.844Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fcdf30cbff5d86101f14aa
Added to database: 5/7/2026, 6:51:28 PM
Last enriched: 5/7/2026, 7:06:30 PM
Last updated: 5/7/2026, 7:55:15 PM
Views: 5
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.