Skip to content

build(deps): pin GitPython>=3.1.58 to resolve GHSA-9rj7-rf2p-w77r, GHSA-wvpp-8hx9-p66j - #349

Open
katsugtgz wants to merge 1 commit into
python:mainfrom
katsugtgz:fix/gitpython-cve-2026-ghsa
Open

build(deps): pin GitPython>=3.1.58 to resolve GHSA-9rj7-rf2p-w77r, GHSA-wvpp-8hx9-p66j#349
katsugtgz wants to merge 1 commit into
python:mainfrom
katsugtgz:fix/gitpython-cve-2026-ghsa

Conversation

@katsugtgz

Copy link
Copy Markdown

Summary

Pin minimum GitPython version in tools_requirements.txt to resolve two recent HIGH-severity advisories:

  • GHSA-9rj7-rf2p-w77r: Repo.init() forwards **kwargs to git init with no unsafe-option guard. An attacker-controlled template kwarg can plant hooks that execute on the next git operation, enabling arbitrary command execution.

  • GHSA-wvpp-8hx9-p66j: The check_unsafe_options guard can be bypassed on all guarded methods via split_single_char_options=False short-option token smuggling, enabling command execution at default allow_unsafe_options=False.

Both fixed in GitPython 3.1.58.

Change

-GitPython
+GitPython>=3.1.58

Single line change in tools_requirements.txt. No application logic affected.

Verification

Scanned with osv-scanner before and after:

  • Before: 22 GitPython advisories flagged (including GHSA-9rj7-rf2p-w77r, GHSA-wvpp-8hx9-p66j, PYSEC-2026-2161, PYSEC-2023-137, and others)
  • After: 0 GitPython advisories. All 22 cleared. Only unrelated httpx advisory (PYSEC-2022-183) remains.

…p66j

GHSA-9rj7-rf2p-w77r: Unguarded git option forwarding in Repo.init
enables arbitrary command execution via --template clone hooks
(CVE pending, HIGH severity)

GHSA-wvpp-8hx9-p66j: Unsafe git option guard bypass via
split_single_char_options=False short-option token smuggling
enables command execution (HIGH severity, CVSS 8.8)

Both fixed in GitPython 3.1.58. This pins the minimum
version in tools_requirements.txt to ensure installs resolve
to a patched release.

No application logic changes.
@StanFromIreland

Copy link
Copy Markdown
Member

We don't pass untrusted input to these functions, I don't see how we are vulnerable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants