Repository navigation
security: fix argument injection via crafted branch names in pull requests - #8390
Merged
Merged
Conversation
…uests Bump gogs/git-module to v1.8.8, which passes --end-of-options to the git diff invocation in DiffBinary. A branch name beginning with a dash, such as "--output=/path", is now treated as a revision rather than a git option, so an authenticated user with write access can no longer make git write files to arbitrary paths by creating a pull request. Fixes GHSA-2grc-qr7q-6m36.
unknwon
force-pushed
the
GHSA-2grc-qr7q-6m36
branch
from
July 16, 2026 03:04
b87648a to
55c4a75
Compare
4 of 6 tasks
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.
A branch name beginning with a dash could be treated by git as a command-line option rather than a revision when building a pull request patch, letting a user with write access influence how the underlying git command behaves (e.g., writing the diff to an arbitrary path via
--output).This bumps gogs/git-module to v1.8.8, which passes
--end-of-optionsto thegit diffinvocation inDiffBinary(gogs/git-module#141), so such a value is treated as a revision that fails to resolve rather than as an option.Fixes GHSA-2grc-qr7q-6m36.