CVE-2026-87818
massGitPython 3.1.59 Diff API Argument Injection Enables Arbitrary File Reads
GitPython 3.1.59 fails to restrict the --no-index option in its high-level diff API, so arguments injected into diff invocations (CWE-88) can cause Git to treat arbitrary local filesystem paths as repository operands, exposing file contents to an attacker. The flaw is triggered when an application passes attacker-controlled arguments into that diff API, for example a service that lets users supply refs, paths, or diff flags. By pairing --no-index with -I/--ignore-matching-lines, the attacker gains a content-dependent Boolean oracle: success or error responses differ depending on whether a guessed string matches a line in a local file, allowing repeated queries to recover single-line secrets. Any deployment running GitPython 3.1.59 whose high-level diff API is reachable with user-influenced arguments is affected, while other uses of the library are not impacted. No exploitation has been reported: the issue is not in CISA KEV, no public proof-of-concept is known, and it carries a CVSS 4.0 score of 7.1 (High).
What to do: Audit applications for calls to GitPython's high-level diff API that pass user-controlled arguments, and strip or whitelist injected diff options such as --no-index and -I/--ignore-matching-lines. Upgrade to a patched GitPython release when one becomes available, since the advisory names 3.1.59 as affected but does not specify a fixed version. As defense in depth, limit the filesystem and secret access of accounts running GitPython-based services so arbitrary file reads yield little of value.
| GitPython (Python package) GitPython | 3.1.59 (the only version named in the advisory; no fixed version provided) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.
- Weakness
- CWE-88
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.