gix-worktree-state nonexclusive checkout sets executable files world-writable
Résumé
gix-worktree-state nonexclusive checkout sets executable files world-writable
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
gix-worktree-state specifies 0777 permissions when checking out executable files, intending that the umask will restrict them appropriately. But one of the strategies it uses to set permissions is not subject to the umask. This causes files in a repository to be world-writable in some situations.
Details
Git repositories track executable bits for regular files. In tree objects and the index, regular file modes are stored as 0644 if not executable, or 0755 if executable. But this is independent of how the permissions are set in the filesystem (where supported).
gix_worktree_state::checkout has two strategies for checking out a file and marking it executable on a Unix-like operating system, one of which is vulnerable:
- If the file is created by assuming it does not already exist, correct permissions are applied, because permissions specified when opening a file are subject to the umask.
- If the file is considered possibly already to exist—even in a clean checkout if the application does not specify the option to treat the destination directory as empty—then permissions conferring unrestricted access to any user account on the system are wrongly applied, because permissions specified when calling chmod on an existing file are not subject to the umask.
Specifically, [checkout::entry::checkout](https://github.co…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Debian DEBIAN-CVE-2025-22620 rust-gix-worktree-state Corrigé dans: 0.11.1-2
Références
- advisory rustsec.org
- advisory github.com
- package crates.io
- web github.com
- web nvd.nist.gov