<Vulnerability name="CVE-2026-67326">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-08-01T12:22:18</PublicDate>
    <Bugzilla id="2510003" url="https://bugzilla.redhat.com/show_bug.cgi?id=2510003" xml:lang="en:us">
gitpython: GitPython: Remote Code Execution via Newline Injection in config_writer()
    </Bugzilla>
    <CVSS3 status="verified">
        <CVSS3BaseScore>7.0</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-93</CWE>
    <Details xml:lang="en:us" source="Mitre">
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.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in GitPython. This vulnerability allows attackers to inject newline characters into the `section` parameter of the `config_writer()` function, leading to the injection of arbitrary section headers into the `.git/config` file. By forging a `[core]` section with a malicious `hooksPath`, an attacker can achieve remote code execution when Git hooks are subsequently triggered.
    </Details>
    <AffectedRelease impact="moderate" cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-23T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:44416">RHSA-2026:44416</Advisory>
        <Package name="llvm-main">llvm-main-22.1.8-4.1.hum1</Package>
    </AffectedRelease>
    <AffectedRelease impact="moderate" cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-25T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:45785">RHSA-2026:45785</Advisory>
        <Package name="swift-lang-main">swift-lang-main-6.3.3-0.1.1.hum1</Package>
    </AffectedRelease>
    <AffectedRelease impact="moderate" cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-26T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:45940">RHSA-2026:45940</Advisory>
        <Package name="llvm21-main">llvm21-main-21.1.8-8.hum1</Package>
    </AffectedRelease>
    <PackageState impact="moderate" cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rust</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-67326
https://nvd.nist.gov/vuln/detail/CVE-2026-67326
https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-mv93-w799-cj2w
https://www.vulncheck.com/advisories/gitpython-before-newline-injection-via-config-writer-section
    </References>
</Vulnerability>