You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Command Injection via Branch Name in Git Graph's Interactive Rebase #940
Describe the Bug
There exists a command injection vulnerability in the VS Code extension Git Graph (mhutchie.git-graph) 1.30.0. The extension's Interactive Rebase action composes a shell command string by concatenating the target branch name into it and hands the result to the integrated terminal. The branch name is repository content: a repository delivered by an attacker-controlled Git server can carry a branch whose name contains a command substitution. When the victim launches Interactive Rebase on that branch, the payload is executed by the victim's shell with the victim's privileges.
This vulnerability leads to arbitrary code execution in the victim's user context.
Steps to Reproduce
Construct the malicious repository
The attacker gives a branch a name containing the payload and points the repository's HEAD at it, so a plain clone makes it the victim's current branch as well.
Then, using Git Graph's Interactive Rebase by clicking the GUI options.
Expected Behaviour
The calculator window appears on the victim's desktop.
Environment
Git Graph Extension Version: 1.30.0
Visual Studio Code Version: 1.130.0
Operating System: Windows 11
Terminal shell: Windows PowerShell 5.1
⚠ Please make sure you complete all of the required sections of this template. Without this required information, it will be harder to replicate this bug, and cause additional delays in resolving it.
.
Activity