CVE-2026-67326 is a newline injection vulnerability in GitPython's config_writer() method that allows attackers to forge git configuration sections and achieve remote code execution through git's hooksPath mechanism. The flaw is not a generic config tamper—it exploits a specific architectural feature: hooksPath tells git where to find executables that run on repository events (commit, push, checkout), and those executables run with the privileges of the git process. By injecting a [core] section with a crafted hooksPath directive, an attacker breaks out of the intended configuration context and forces git to load attacker-controlled hooks on the next triggering operation.
Version 3.1.50 patches the immediate entry point by adding newline validation to section parameters in config_writer(). If you're using GitPython, verify your version immediately. However, the patch addresses only one entry point in a library with significant downstream reach—GitPython appears in CI/CD pipelines, security scanners, git hosting backends, and automation tooling that process repositories.
The critical distinction for defenders: local development cloning a malicious repo triggers no RCE because git hooks don't execute during clone. The attack surface concentrates in tooling that clones untrusted repositories and then performs hook-triggering operations—CI systems running tests after checkout, automated security scanners that invoke git commands, or any automation that processes external PRs. This is not a uniform exposure; it's concentrated in operational workflows that cross trust boundaries.
Two non-trivial concerns remain. First, GitPython exposed git's internal config format as a raw API, placing the security burden on developers who shouldn't need to understand git config injection semantics. If you maintain tools that wrap config_writer() with user input, audit that code path now. Second, vendoring means the 3.1.50 patch doesn't reach every deployed copy—frozen Docker images, locked CI environments, and internal forks may carry the vulnerability without any update mechanism triggering. Treat this as a higher priority than CVSS alone suggests because the remediation chain is longer: not one deploy to patch, but dozens or hundreds across infrastructure you may not directly control.