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: 6.7 [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]
CVE-ID: CVE-2025-22620
CWE-ID: CWE-281
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

gix-worktree-state

How to mitigate CVE-2025-22620

Install security update from vendor's website.

gix-worktree-state - update to 0.17.0

External References

Related Security Bulletins