CVE-2026-44244: CWE-94: Improper Control of Generation of Code ('Code Injection') in gitpython-developers GitPython
CVE-2026-44244 is a high-severity code injection vulnerability in GitPython versions prior to 3.1.49. The issue arises because GitConfigParser.set_value() does not validate newline characters in configuration values, allowing an attacker to inject a crafted core.hooksPath configuration. This injected path can cause Git operations that invoke hooks (such as commit, merge, or checkout) to execute attacker-controlled scripts. The vulnerability has been patched in GitPython version 3.1.49.
AI Analysis
Technical Summary
GitPython is a Python library for interacting with Git repositories. Versions before 3.1.49 contain a vulnerability where GitConfigParser.set_value() passes unvalidated values containing newlines to Python's configparser. Although GitPython attempts to convert embedded newlines into indented continuation lines, Git itself accepts indented [core] stanzas as valid section headers. This allows an attacker to inject a malicious core.hooksPath configuration, causing Git operations that trigger hooks to execute scripts from an attacker-controlled location. This is a code injection vulnerability classified under CWE-94. The issue is fixed in version 3.1.49.
Potential Impact
Successful exploitation allows an attacker with local privileges to execute arbitrary code during Git operations that invoke hooks, such as commit, merge, or checkout. This can lead to full compromise of the affected system with the privileges of the user running GitPython. The CVSS score of 7.8 reflects high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade GitPython to version 3.1.49 or later where this vulnerability is patched. No other vendor advisory or patch link is provided, but the fix is confirmed in version 3.1.49. Until upgrading, avoid using untrusted input in GitPython configuration values that could contain newlines.
CVE-2026-44244: CWE-94: Improper Control of Generation of Code ('Code Injection') in gitpython-developers GitPython
Description
CVE-2026-44244 is a high-severity code injection vulnerability in GitPython versions prior to 3.1.49. The issue arises because GitConfigParser.set_value() does not validate newline characters in configuration values, allowing an attacker to inject a crafted core.hooksPath configuration. This injected path can cause Git operations that invoke hooks (such as commit, merge, or checkout) to execute attacker-controlled scripts. The vulnerability has been patched in GitPython version 3.1.49.
CVSS v3.1
Score 7.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
GitPython is a Python library for interacting with Git repositories. Versions before 3.1.49 contain a vulnerability where GitConfigParser.set_value() passes unvalidated values containing newlines to Python's configparser. Although GitPython attempts to convert embedded newlines into indented continuation lines, Git itself accepts indented [core] stanzas as valid section headers. This allows an attacker to inject a malicious core.hooksPath configuration, causing Git operations that trigger hooks to execute scripts from an attacker-controlled location. This is a code injection vulnerability classified under CWE-94. The issue is fixed in version 3.1.49.
Potential Impact
Successful exploitation allows an attacker with local privileges to execute arbitrary code during Git operations that invoke hooks, such as commit, merge, or checkout. This can lead to full compromise of the affected system with the privileges of the user running GitPython. The CVSS score of 7.8 reflects high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade GitPython to version 3.1.49 or later where this vulnerability is patched. No other vendor advisory or patch link is provided, but the fix is confirmed in version 3.1.49. Until upgrading, avoid using untrusted input in GitPython configuration values that could contain newlines.
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: 05/07/2026, 18:51:28 UTC
Last enriched: 05/15/2026, 10:49:59 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 100
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.