Skip to content

Gitk can create and truncate a user's files

Low
j6t published GHSA-f3cw-xrj3-wr2v Jul 10, 2025

Package

Git

Affected versions

1.7.0 to 2.50.0

Patched versions

2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1, 2.50.1

Description

Impact

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).

Patches

Workarounds

  • Ensure that the option Support per-file encoding in Gitk's Preferences is disabled.
  • Do not use Show origin of this line.
  • Do not clone repositories from untrusted sources.
  • Do not use gitk.

References

A similar issue is present in Git GUI.

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N

CVE ID

CVE-2025-27613

Weaknesses

No CWEs

Credits