Improper Preservation of Permissions in gix-worktree-state - CVE-2025-22620

 

Improper Preservation of Permissions in gix-worktree-state - CVE-2025-22620

Published: January 18, 2025 / Updated: May 5, 2026


Vulnerability identifier: #VU129771
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2025-22620
CWE-ID: CWE-281
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: GitoxideLabs
Affected software:
gix-worktree-state

Detailed vulnerability description

The vulnerability allows a local user to modify executable files with overly permissive world-writable permissions.

The vulnerability exists due to improper preservation of permissions in gix_worktree_state::checkout and checkout::entry::finalize_entry when checking out executable files with destination_is_initially_empty set to false. A local user can perform a checkout that sets mode 0777 on executable files to modify executable files with overly permissive world-writable permissions.

This affects Unix-like systems, and user interaction is required to perform the checkout operation.


How to mitigate CVE-2025-22620

Install security update from vendor's website.

Sources