Vulnerability · Published May 7, 2026 · Assigned by GitHub_M
CVE-2026-44244GitPython: Newline injection in config_writer().set_value() enables RCE via core.hooksPath
High 7.8
In plain English
A high-severity code injection in GitPython from gitpython-developers. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 15% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
GitPython is a python library used to interact with Git repositories. Prior to version 3.1.49, GitConfigParser.set_value() passes values to Python's configparser without validating for newlines. GitPython's own _write() converts embedded newlines into indented continuation lines (e.g. \n becomes \n\t), but Git still accepts an indented [core] stanza as a section header — so the injected core.hooksPath becomes effective configuration. Any Git operation that invokes hooks (commit, merge, checkout) will then execute scripts from the attacker-controlled path. This issue has been patched in version 3.1.49.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-git | 3.1.30-1+deb12u3 | DEBIAN-CVE-2026-44244 |
| Debian:13 | python-git | 3.1.44-1+deb13u1 | DEBIAN-CVE-2026-44244 |
| Debian:14 | python-git | 3.1.50-1 | DEBIAN-CVE-2026-44244 |
| PyPI | gitpython | 3.1.49 | PYSEC-2026-2163 |
| PyPI | gitpython | 3.1.49 | GHSA-v87r-6q3f-2j67 |
| Ubuntu:25.10 | python-git | no fix listed | UBUNTU-CVE-2026-44244 |
| Ubuntu:26.10 | python-git | no fix listed | UBUNTU-CVE-2026-44244 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| gitpython-developers | GitPython | < 3.1.49 |
Weakness: CWE-94 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H