[Aikido] Fix security issue in gitpython via minor version upgrade from 3.1.57 to 3.1.60 - #20
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
Author
|
Closed by Aikido: a new AutoFix has been created → #21 |
aikido-autofix
Bot
deleted the
fix/aikido-security-update-packages-98538079-gbfo
branch
August 28, 2026 01:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade GitPython to fix arbitrary file read/write, path traversal, config injection, and RCE vulnerabilities in git operations.
✅ 6 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
IndexFile.remove()andHead.checkout()methods that forward unsanitized kwargs to git commands, allowing attackers to read arbitrary files via--pathspec-from-fileand--pathspec-file-nuloptions with file contents returned in error messages.IndexFile.from_tree,reset, andmerge_treefail to sanitize caller-controlled treeish arguments passed togit read-tree, allowing injection of--index-outputto overwrite arbitrary files with git-index blobs. This enables arbitrary file destruction/corruption at process privileges.Repo.init()passes unsanitized kwargs togit init, allowing an attacker to inject--templateparameter that plants malicious git hooks for arbitrary code execution on the next git operation.=,#,;,[,], whitespace), allowing attackers to inject arbitrary git-config directives by embedding these characters in option names. This enables remote code execution viacore.sshCommandorcore.hooksPathwhen an application forwards attacker-controlled option names to the config writer.split_single_char_options=False, causing the security check to miss the smuggled option whiletransform_kwargemits a joined token that git parses as--upload-pack=<cmd>. This incomplete fix of a prior vulnerability affects all guarded methods at the defaultallow_unsafe_options=Falsesetting.🔗 Related Tasks
🤖 Remediation details
Upgrade
gitpythonto remediate multiple security advisoriesThis PR upgrades the vulnerable package
gitpythonfrom3.1.57to3.1.60to address six security advisories (one MEDIUM, five LOW severity). The change is a lockfile-only update:gitpythonis a direct dependency declared in the rootpyproject.tomlwith the existing constraintgitpython>=3.1.55, which already permits the patched version. Onlyuv.lockwas regenerated; no manifest edits were required.gitpython
gitpythonwas resolved at3.1.57, which falls below the minimum patched version of3.1.58required to address six security advisories. Because the rootpyproject.tomlalready declaresgitpython>=3.1.55, no manifest change was needed; runninguv lock --upgrade-package gitpythonwas sufficient to advance the lockfile-resolved version to3.1.60, satisfying all patched-version requirements.Version changes