CVE-2025-46835 Overview
CVE-2025-46835 is an argument injection vulnerability (CWE-88) in Git GUI, the graphical user interface component for Git source control management tools. The vulnerability allows attackers to create and overwrite files on a victim's system when the user clones an untrusted repository containing a maliciously named directory and is subsequently tricked into editing a file within that directory.
Critical Impact
Attackers can leverage maliciously crafted repository structures to achieve arbitrary file creation and overwrite on systems where users have write permissions, potentially leading to code execution or system compromise.
Affected Products
- Git GUI versions prior to 2.43.7
- Git GUI versions 2.44.x prior to 2.44.4
- Git GUI versions 2.45.x prior to 2.45.4
- Git GUI versions 2.46.x prior to 2.46.4
- Git GUI versions 2.47.x prior to 2.47.3
- Git GUI versions 2.48.x prior to 2.48.2
- Git GUI versions 2.49.x prior to 2.49.1
- Git GUI versions 2.50.x prior to 2.50.1
Discovery Timeline
- 2025-07-10 - CVE-2025-46835 published to NVD
- 2025-11-04 - Last updated in NVD database
Technical Details for CVE-2025-46835
Vulnerability Analysis
This vulnerability stems from improper neutralization of argument delimiters in Git GUI (CWE-88: Improper Neutralization of Argument Delimiters in a Command). The flaw occurs when Git GUI processes file paths containing specially crafted directory names that can be interpreted as command arguments or options.
When a user clones a repository containing a maliciously named directory and uses Git GUI to edit a file within that directory, the application fails to properly sanitize or escape the directory name. This allows an attacker to inject arguments that cause Git GUI to create or overwrite arbitrary files on the user's system, limited only by the user's existing write permissions.
The attack requires local access in the sense that the user must clone and interact with the malicious repository, and user interaction is required as the victim must be tricked into editing a specific file. However, no authentication or special privileges are needed to exploit this vulnerability.
Root Cause
The root cause is insufficient input validation and argument sanitization in Git GUI's file handling routines. When constructing commands or file operations involving user-provided directory paths from cloned repositories, Git GUI fails to properly neutralize special characters and argument delimiters that could be interpreted as command options or redirect file operations to unintended locations.
Attack Vector
The attack vector involves a local attack requiring user interaction:
- An attacker creates a malicious Git repository with a specially crafted directory name containing argument injection sequences
- The attacker distributes this repository through common channels (public hosting, social engineering, etc.)
- A victim clones the untrusted repository to their local system
- Using Git GUI, the victim navigates to edit a file located within the maliciously named directory
- Git GUI processes the malicious directory name, interpreting embedded sequences as arguments
- This results in arbitrary file creation or overwrite at locations within the user's write permissions
The vulnerability is particularly concerning because it exploits normal developer workflows—cloning repositories and editing files are routine operations that developers perform frequently.
Detection Methods for CVE-2025-46835
Indicators of Compromise
- Unexpected file creation or modification in user-writable directories following Git GUI usage
- Git repositories containing directories with unusual names featuring argument-like patterns (e.g., names starting with -- or containing shell metacharacters)
- Anomalous file system activity correlated with Git GUI process execution
- Modified configuration files or script files that the user did not intentionally create
Detection Strategies
- Monitor file system operations initiated by Git GUI processes for writes to locations outside the expected repository working directory
- Implement behavioral analysis to detect argument injection patterns in directory names within cloned repositories
- Enable audit logging for file creation and modification events, correlating with Git GUI execution
- Deploy endpoint detection rules to identify repositories containing suspiciously named directories
Monitoring Recommendations
- Configure SentinelOne Singularity platform to monitor Git GUI process behavior and file system modifications
- Establish baseline behavior profiles for Git GUI operations to identify anomalous file access patterns
- Review repository contents before cloning from untrusted sources, particularly examining directory naming conventions
- Implement repository scanning in CI/CD pipelines to detect potentially malicious directory structures
How to Mitigate CVE-2025-46835
Immediate Actions Required
- Update Git GUI to a patched version immediately: 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1, or 2.50.1 or later
- Avoid cloning or interacting with untrusted Git repositories until patching is complete
- Use command-line Git instead of Git GUI when working with repositories from unknown sources
- Review recently cloned repositories for directories with suspicious naming patterns
Patch Information
Security patches have been released across multiple Git GUI version branches. Organizations should update to the following fixed versions based on their current deployment:
| Current Branch | Fixed Version |
|---|---|
| 2.43.x | 2.43.7 |
| 2.44.x | 2.44.4 |
| 2.45.x | 2.45.4 |
| 2.46.x | 2.46.4 |
| 2.47.x | 2.47.3 |
| 2.48.x | 2.48.2 |
| 2.49.x | 2.49.1 |
| 2.50.x | 2.50.1 |
For detailed patch changes, refer to the GitHub Comparison Changes. Additional security information is available in the GitHub Security Advisory GHSA-xfx7-68v4-v8fg and the Debian LTS Security Announcement.
Workarounds
- Use command-line Git exclusively until Git GUI can be patched, avoiding the graphical interface entirely
- Do not clone repositories from untrusted or unknown sources
- If repository cloning is necessary, inspect directory names for suspicious patterns before using Git GUI
- Implement file system access controls to limit write permissions to only necessary directories
- Consider using containerized or sandboxed environments when working with untrusted repositories
# Verify current Git GUI version
git gui --version
# Update Git (which includes Git GUI) via package manager
# For Debian/Ubuntu:
sudo apt update && sudo apt upgrade git-gui
# For macOS with Homebrew:
brew upgrade git
# For Windows, download the latest installer from git-scm.com
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

