# GitPython: git-config section-name injection enables arbitrary config directives (core.sshCommand RCE)

Advisory record · `GHSA-3rp5-jjmw-4wv2`

- **Identifiers:** `GHSA-3rp5-jjmw-4wv2` · `CVE-2026-69097` · `PYSEC-2026-3981`
- **State:** Confirmed
- **Severity:** CVSS 7.3 High
- **Critical:** No
- **Weakness (CWE):** [CWE-74](https://cwe.mitre.org/data/definitions/74.html)
- **Tags:** [Other injection](https://agentprime.io/advisories/tag/injection.md)
- **Published:** 24 Jul 2026
- **Updated:** 23 Oct 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 24 Jul 2026, 16:22 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `gitpython` (PyPI): affected `<3.1.53`; fixed in `3.1.53`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> GitPython versions before 3.1.53 are vulnerable to config section-name injection: section names are written into a git config header with only CR, LF and NUL filtered, so a name containing a closing bracket can inject an arbitrary config directive such as core.sshCommand. An attacker who can supply a submodule name, either through a cloned repository's .gitmodules file or through an application that lets users name submodules, can achieve remote code execution on the next git operation. Upgrade to GitPython 3.1.53 or later; the source gives no other workaround.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.3 High, CVSS 4.0: `CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`, from CNA (VulnCheck)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0027, the 19th percentile, on 13 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:08 UTC: First seen by agentprime
- 31 Oct 2026, 14:08 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-3rp5-jjmw-4wv2)

## Sources

- [GitHub Advisory Database: GHSA-3rp5-jjmw-4wv2](https://github.com/advisories/GHSA-3rp5-jjmw-4wv2)
- [OSV: GHSA-3rp5-jjmw-4wv2](https://osv.dev/vulnerability/GHSA-3rp5-jjmw-4wv2)
- <https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-3rp5-jjmw-4wv2>
- <https://github.com/gitpython-developers/GitPython/pull/2176>
- <https://github.com/gitpython-developers/GitPython/commit/1ed1b924f4e2d2ee7bab296df77b978af21853f1>
- <https://github.com/gitpython-developers/GitPython>
- <https://github.com/gitpython-developers/GitPython/releases/tag/3.1.53>
- <https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2026-3981.yaml>
- <https://www.vulncheck.com/advisories/gitpython-before-config-injection-via-submodule-names>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-3rp5-jjmw-4wv2>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-3rp5-jjmw-4wv2/>. Everything for agents: <https://agentprime.io/llms.txt>.
