PT-2024-3748 · Git+9 · Git+9

Patrick Steinhardt

·

Published

2024-05-14

·

Updated

2025-02-03

·

CVE-2024-32021

CVSS v3.1

7.1

High

VectorAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions: Git versions prior to 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4
Description: The issue is related to Git, a revision control system. When cloning a local source repository that contains symlinks via the filesystem, Git may create hardlinks to arbitrary user-readable files on the same filesystem as the target repository in the objects/ directory. This occurs because the optimizations for local cloning include attempting to hard link the object files instead of copying them, and the checks against symbolic links in the source repository can be bypassed.
Recommendations: To resolve the issue for each affected version, update to version 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, or 2.39.4, or later. As a temporary workaround, consider using the --no-local option when cloning a repository over the filesystem to prevent the creation of hardlinks. Restrict access to the objects/ directory in the target Git repository to minimize the risk of exploitation. Avoid using the filesystem protocol when cloning a local repository, and instead explicitly specify the file:// protocol to prevent the use of local cloning optimizations.

Exploit

Fix

Weakness Enumeration

Related Identifiers

ALSA-2024:4083
ALSA-2024:4084
AZL-42013
AZL-43042
BDU:2024-04094
BIT-GIT-2024-32021
CESA-2024_4084
CVE-2024-32021
DLA-3844-1
DLA-3867-1
DSA-5769-1
GHSA-MVXM-9J2H-QJX7
INFSA-2024_4083
INFSA-2024_4084
MGASA-2024-0204
OESA-2024-1662
OPENSUSE-SU-2024:13968-1
OPENSUSE-SU-2024_1807-1
OPENSUSE-SU-2024_2277-1
RHSA-2024:4083
RHSA-2024:4084
RHSA-2024:4368
RHSA-2024_4083
RHSA-2024_4084
RLSA-2024:4083
RLSA-2024:4084
SUSE-SU-2024:1807-1
SUSE-SU-2024:1807-2
SUSE-SU-2024:1854-1
SUSE-SU-2024:2277-1
SUSE-SU-2025:0197-1
SUSE-SU-2025:20049-1
SUSE-SU-2025_0197-1
USN-6793-1
USN-7023-1

Affected Products

Almalinux
Astra Linux
Centos
Git
Linuxmint
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu