CVE-2025-27613: Gitk can create and truncate files in the user's home directory
CVE-2025-27613 is regarding a vulnerability in Gitk where when a user clones an untrusted repository and runs Gitk without additional command arguments, any writable file can be created and truncated. The option "Support per-file encoding" must have been enabled. The operation "Show origin of this line" is affected as well, regardless of the option being enabled or not. GitHub created this CVE on their behalf. The documented Visual Studio updates incorporate updates in GitK which address this vulnerability. Please see CVE-2025-27613 for more information.
Other sources
GitHub: CVE-2025-27613 Gitk Arguments Vulnerability
— Microsoft
Gitk is a Tcl/Tk based Git history browser. Starting with 1.7.0, when a user clones an untrusted repository and runs gitk without additional command arguments, files for which the user has write permission can be created and truncated. The option Support per-file encoding must have been enabled before in Gitk's Preferences. This option is disabled by default. The same happens when Show origin of this line is used in the main window (regardless of whether Support per-file encoding is enabled or not). This vulnerability is fixed in 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1, and 2.50.1.
— MITRE
When a user clones an untrusted repository and runs Gitk without additional command arguments, any writable file can be created and truncated. The option "Support per-file encoding" must have been enabled. The operation "Show origin of this line" is affected as well, regardless of the option being enabled or not.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.43.7 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.44.4 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.45.4 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.46.4 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.47.3 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.48.2 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.49.1 - Upgrade
Upgrade
Gitkto a version that resolves this vulnerability.Fixed in 2.50.1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-27613?
CVE-2025-27613 is classified as a high-severity vulnerability due to the potential for arbitrary file creation and truncation.
How do I fix CVE-2025-27613?
To mitigate CVE-2025-27613, update to the latest version of Visual Studio 2022 or 2019 as per the provided patches.
Which software is affected by CVE-2025-27613?
CVE-2025-27613 affects specific versions of Microsoft Visual Studio 2017, 2019, and 2022.
What actions should I take if I have an untrusted repository in Gitk related to CVE-2025-27613?
Avoid cloning untrusted repositories while using Gitk to prevent exposure to CVE-2025-27613.
Is there a patch available for CVE-2025-27613?
Yes, patches are available for affected versions of Visual Studio to address CVE-2025-27613.