GitPython before 3.1.50 Newline Injection via config_writer section
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| gitpython-developers | GitPython | before 3.1.50 | 3.1.50 | Patch available | CNA |
- GitPython Vendorgitpython-developers Affected before 3.1.50 Fixed in 3.1.50 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* | before 3.1.50 | Vulnerable | gitpython-developers |
- cpe:2.3:a:gitpython_project:gitpython:*:*:*:*:*:python:*:* Versions before 3.1.50 Vulnerable ·gitpython-developers
Remediation
- Fix · CNA GitPython (gitpython-developers) Fixed in 3.1.50
Red Hat 3 advisories
- RHSA-2026:45940 Released 2026-07-26 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images clang21-21.1.8-8.hum1@aarch64, clang21-21.1.8-8.hum1@x86_64, clang21-analyzer-21.1.8-8.hum1@aarch64 +47
- RHSA-2026:45785 Released 2026-07-25 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images swift-lang-6.3.3-0.1.1.hum1@aarch64, swift-lang-6.3.3-0.1.1.hum1@src, swift-lang-6.3.3-0.1.1.hum1@x86_64 +2
- RHSA-2026:44416 Released 2026-07-23 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images clang-22.1.8-4.1.hum1@aarch64, clang-22.1.8-4.1.hum1@x86_64, clang-analyzer-22.1.8-4.1.hum1@aarch64 +47
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Hardened Images | Fixed | RHSA-2026:44416, RHSA-2026:45785, RHSA-2026:45940 |
Not affected: 2 products
- Red Hat Hardened Images
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-10-02 Threatist record created from CVE-2026-67326
- 2026-10-03 Alias added: GHSA-gmvg-8p66-77hg
- 2026-11-06 Affected versions changed · Red Hat
References
More gitpython-developers Gitpython vulnerabilities
- TI-2026-54689 GitPython before 3.1.59 Path Traversal via separate-git-dir CVSS 4.0HIGH 8.7
- TI-2026-51706 GitPython before 3.1.55 Environment Variable Exfiltration via Remote.add() CVSS 4.0HIGH 8.7
- TI-2026-47618 GitPython before 3.1.52 Environment Variable Exfiltration via clone_from CVSS 4.0HIGH 8.7
- TI-2026-30595 GitPython: Unsafe option check validates multi_options before shlex.split transforms it CVSS 3.1CRITICAL 9.8
- TI-2026-32220 GitPython: Path traversal in GitPython reference APIs allows arbitrary file write and delete outside the repository CVSS 4.0HIGH 7.8
- TI-2026-47621 GitPython before 3.1.51 Command Injection via option prefix abbreviation CVSS 4.0HIGH 8.7
Sources
- CVE-2026-67326 · CVE Program
- CVE-2026-67326 · NVD
- FIRST EPSS
- GHSA-gmvg-8p66-77hg · GitHub Advisory Database · CC BY 4.0
- CVE-2026-67326 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences