Advisory

PYSEC-2026-3980

Also known as: CVE-2026-67326, GHSA-mv93-w799-cj2w

Summary

The record has no summary.

Details

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.

Severity

High Basis: CVSS v3 score 7.8, vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2026-08-01 13:17 UTC
Modified
2026-09-17 09:00 UTC

Affected packages and fixes

gitpython

PyPI · All systems

Affected

  • introduced 0, fixed 3.1.50 (ecosystem)

Fixed versions

3.1.50

Fix

  • Fixed version 3.1.50
    pip install --upgrade gitpython==3.1.50

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences