Improper Preservation of Permissions
CVE-2024-32020
Summary
Git is a revision control system. Local clones may end up hard-linking files into the target repository's object database when the source and target repository reside on the same disk. If the source repository is owned by a different user, then those hardlinked files may be rewritten at any point in time by the untrusted user. Cloning local repositories will cause Git to either copy or hard link files of the source repository into the target repository. This significantly speeds up such local clones compared to doing a "proper" clone and saves both disk space and compute time. When cloning a repository located on the same disk that is owned by a different user than the current user we also end up creating such hard links. These files will continue to be owned and controlled by the potentially untrusted user and can be rewritten by them at will in the future. This issue affects Git versions prior to 2.39.4, 2.40.x prior to 2.40.2, 2.41.x prior to 2.41.1, 2.42.x prior to 2.42.2, 2.43.x prior to 2.43.4, 2.44.x prior to 2.44.1 and 2.45.x prior to 2.45.1.
- LOW
- LOCAL
- LOW
- UNCHANGED
- REQUIRED
- NONE
- NONE
- NONE
CWE-281 - Improper Preservation of Permissions
The software does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended.
References
Advisory Timeline
- Published