Every CVE Search/ Get API key

CVE-2025-22620

gix-worktree-state nonexclusive checkout sets executable files world-writable

5.0 MediumPublic exploitFix available

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
None

Exploit likelihood

0.37%Up 0.3 points since Jan 21, 2025
90%50%10%1%

What each source reports

CVE List Score used 5.0

gix-worktree-state nonexclusive checkout sets executable files world-writable

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Record
CVE-2025-22620
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Weakness
CWE-281, CWE-687
Updated
2026-11-02
EUVDEUVD-2025-0160 5.0

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Record
EUVD-2025-0160
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-fqmf-w4xh-33rh 5.0

gix-worktree-state nonexclusive checkout sets executable files world-writable

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 chooses the strategy for each file. The same strategy is usually chosen for each executable file, if no process (i.e. long running) smudge filter is in use. The strategy depends on the checkout::Options::destination_is_initially_empty value, which is passed along to checkout::entry::open_file, whose return value includes a flag indicating whether permissions still need to be set:

…

Record
GHSA-fqmf-w4xh-33rh
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Weakness
CWE-281, CWE-687
Updated
2026-11-02
NVD 5.0

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Record
CVE-2025-22620
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Weakness
CWE-281, CWE-687
Updated
2026-11-02
OSV 5.0

gix-worktree-state nonexclusive checkout sets executable files world-writable

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Record
CVE-2025-22620
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Weakness
CWE-281, CWE-687
Updated
2026-11-02
OSVDEBIAN-CVE-2025-22620 5.0

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Record
DEBIAN-CVE-2025-22620
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Updated
2026-11-02
Show 5 moreShow less
OSVGHSA-fqmf-w4xh-33rh 5.0

gix-worktree-state nonexclusive checkout sets executable files world-writable

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 chooses the strategy for each file. The same strategy is usually chosen for each executable file, if no process (i.e. long running) smudge filter is in use. The strategy depends on the checkout::Options::destination_is_initially_empty value, which is passed along to checkout::entry::open_file, whose return value includes a flag indicating whether permissions still need to be set:

…

Record
GHSA-fqmf-w4xh-33rh
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Weakness
CWE-281, CWE-687
Updated
2026-11-02
OSVRUSTSEC-2025-0001 5.0

gix-worktree-state nonexclusive checkout sets executable files world-writable

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 chooses the strategy for each file. The same strategy is usually chosen for each executable file, if no process (i.e. long running) smudge filter is in use. The strategy depends on the checkout::Options::destination_is_initially_empty value, which is passed along to checkout::entry::open_file, whose return value includes a flag indicating whether permissions still need to be set:

…

Record
RUSTSEC-2025-0001
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2025-22620 5.0

gitoxide is an implementation of git written in Rust. Prior to 0.17.0, 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. This vulnerability is fixed in 0.17.0.

Record
UBUNTU-CVE-2025-22620
CVSS 3.1
5.0 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N
Updated
2026-11-02
OSVopenSUSE-SU-2025:14994-1 No score

gitoxide-0.42.0-1.1 on GA media

These are all security issues fixed in the gitoxide-0.42.0-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:14994-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:21558-1 No score

Security update for gitoxide

This update for gitoxide fixes the following issues:

Changes in gitoxide:

  • Update to 0.56.0:

    • Fixes CVE-2026-40034 (boo#1266434): the CommandForbiddenInModules trust check could be bypassed in gix_submodule::File::update(), which allowed arbitrary command execution from a crafted .gitmodules file
    • Fixes a submodule name validation bypass that allowed traversal out of .git/modules and disclosure of credentials
    • Fixes symlinked .gitmodules files being followed and parsed from outside the repository
    • Fixes several denial-of-service vectors in gix-pack: unchecked indexing panics and uncapped allocations from crafted pack data
    • Fixes HTTP credentials being leaked to the redirected host by the curl transport backend
    • Add the gix config show, gix config list, gix config fmt, gix free remote refs, gix free trust, gix dirwalk and gix tix subcommands
    • Add a gix status --untracked flag and gix merge tree --message for creating commits
    • gix exclude query is now index-aware and no longer reports ignore matches for tracked files, matching git check-ignore
    • Preserve all configured remote URLs rather than only the last one
    • Fix fetching and cloning with tag refspecs in shallow clones, relative worktree linking files and loose ref path-prefix collisions
    • Update the crates to the Rust 2024 edition
  • Refresh the vendored dependencies. Recording the state of the remaining open CVE bugs against this version, none of which it is affected by:

    • CVE-2026-25541 (boo#1274525): the vendored bytes is now 1.12.1, above the 1.11.1 fix
    • CVE-2025-22620 (boo#1236139): gix-worktree-state is 0.33.0, far above the 0.17.0 that fixed the world-writable checkout of executable files
  • update to 0.50.0: see https://github.com/GitoxideLabs/gitoxide/compare/v0.42.0...v0.50.0

  • update to 0.42.0:

    • add first 'debug' version of gix diff file
    • use revspecs for revision and path
    • CVE-2025-31130: use collision-detecting SHA-1 hash boo#1240872
  • Update to version 0.41.0:

    • add gix blame -L start,end
    • add gix env to print paths relevant to the Git installation.
    • Document the remaining subcommands
    • Add support for statistics and additional performance information.
    • add gix blame to the CLI. That way it's possible to see the blame result of any file in the repository.
  • Updates from version 0.40.0:

    • add first 'debug' version of gix log. It's primarily meant to better understand gix blame.
    • add --tree-favor to gix merge tree|commit. With it one can decide which side to favor in case of irreconcilable tree-conflicts.
    • CVE-2025-22620: gix-worktree-state specifies 0777 permissions when checking out executable files (boo#1236139)
  • Update to version 0.39.0: New Features

    • add gix merge commit --debug
    • add gix merge commits
    • add gix merge tree to merge trees similarly to git merge-tree.
  • Update to version 0.38.0: New Features

    • support for listing worktrees with gix worktree list
    • add first 'debug' version of gix diff tree.
    • add new gix cat command.
    • add gix merge-file with similar features as git merge-file
    • gix merge-base for the CLI Bug Fixes
    • Adjust gix clean warning and help for worktree fix
    • Clarify -r/--repositories and --skip-hidden-repositories Other
    • switch from time to jiff
    • Unify style in config support info
Record
openSUSE-SU-2026:21558-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
gix-worktree-state
crates.io
before 0.17.0
0.17.0
rust-gix-worktree-state
Debian:13
before 0.11.1-2
0.11.1-2
rust-gix-worktree-state
Debian:14
before 0.11.1-2
0.11.1-2
gix-worktree-state
crates.io
0.0.0-0 up to 0.17.0
0.17.0
gitoxide
openSUSE:Tumbleweed
before 0.42.0-1.1
0.42.0-1.1
gitoxide
openSUSE:Leap 16.0
before 0.56.0-bp160.1.1
0.56.0-bp160.1.1

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubEliahKagan/checkout-index2025-01-19

History

History
RecordedChangedSources
affected
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-22620 is a medium vulnerability (CVSS 5.0) in Gitoxidelabs Gitoxide, published January 18, 2025. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.37%, the 31st percentile. Fixed in gix-worktree-state 0.17.0.

References

Show 16 moreShow less
This page doesn't list everything

Left out here: the rest of 3 source descriptions. The JSON record has them.

MoveEnter Open