{"id":"CVE-2026-67326","title":"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","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] se…","severity":"high","cvss":7,"cvssVector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-20","CWE-93"],"vendor":"gitpython_project","product":"gitpython","affected":["gitpython < 3.1.50"],"patched":["gitpython 3.1.50"],"published":"2026-08-01","updated":"2026-09-16","sourceUpdated":"2026-09-16T20:45:28.520","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-67326","references":[{"url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-mv93-w799-cj2w","label":"disclosure@vulncheck.com"},{"url":"https://www.vulncheck.com/advisories/gitpython-before-newline-injection-via-config-writer-section","label":"disclosure@vulncheck.com"},{"url":"https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-mv93-w799-cj2w","label":"134c704f-9b21-4f2e-91b3-4a467353bcc0"},{"url":"https://github.com/advisories/GHSA-rpm5-65cw-6hj4"},{"url":"https://github.com/gitpython-developers/GitPython"},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-67326.json"},{"url":"https://access.redhat.com/security/cve/CVE-2026-67326"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2510003"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-67326"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-67326"},{"url":"https://access.redhat.com/errata/RHSA-2026:44416"},{"url":"https://access.redhat.com/errata/RHSA-2026:45940"},{"url":"https://access.redhat.com/errata/RHSA-2026:45785"}],"tags":["nvd","osv","pip","csaf","vex","red-hat"],"epss":0.00278,"epssPercentile":0.20549,"aliases":["GHSA-mv93-w799-cj2w","PYSEC-2026-3980"],"ecosystem":"pip","ingestedAt":"2026-08-02T07:18:02.274Z","slug":"CVE-2026-67326","body":"## Overview\n\nGitPython 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.\n\n## Affected\n\n- `gitpython < 3.1.50`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `gitpython 3.1.50`\n\n## Package advisory (CVE-2026-67326)\n\nAffected packages:\n\n- `gitpython < 3.1.50`\n\nPatched in:\n\n- `gitpython 3.1.50`\n\nSource: https://osv.dev/vulnerability/GHSA-mv93-w799-cj2w\n\n## Vendor advisories\n\n- **RHSA-2026:44416** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-23 · [advisory](https://access.redhat.com/errata/RHSA-2026:44416)\n- **RHSA-2026:45940** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-26 · [advisory](https://access.redhat.com/errata/RHSA-2026:45940)\n- **RHSA-2026:45785** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-07-25 · [advisory](https://access.redhat.com/errata/RHSA-2026:45785)","depth":"twilight","depthScore":39,"depthScoreParts":{"impact":38.5,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}