PT-2021-7939 · Gnu+7 · Gnu Binutils+7

Rich Felker

·

Published

2020-12-01

·

Updated

2025-12-03

·

CVE-2021-20197

CVSS v3.1

6.3

Medium

VectorAV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions GNU Binutils versions 2.35 and earlier
Description The issue is related to an open race window when writing output in certain utilities, including ar, objcopy, strip, and ranlib. This can be exploited by an unprivileged user to trick these utilities into gaining ownership of arbitrary files through a symlink, potentially allowing privilege escalation. The utilities are vulnerable when run as a privileged user, such as part of a script updating binaries across different users.
Recommendations For GNU Binutils versions 2.35 and earlier, consider restricting the use of the vulnerable utilities (ar, objcopy, strip, and ranlib) when run as a privileged user to minimize the risk of exploitation. Avoid using these utilities in scripts that update binaries across different users until a fix is available. As a temporary workaround, consider disabling the use of symlinks in these utilities until a patch is available. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Link Following

Race Condition

Weakness Enumeration

Related Identifiers

ALSA-2021:4364
ALT-PU-2020-3433
ALT-PU-2023-1178
AZL-41714
BDU:2023-05789
CESA-2021_4364
CVE-2021-20197
MGASA-2021-0341
OESA-2021-1153
OPENSUSE-SU-2021:1475-1
OPENSUSE-SU-2021:3616-1
OPENSUSE-SU-2021_1475-1
OPENSUSE-SU-2021_3616-1
OPENSUSE-SU-2024:10651-1
RHSA-2021:4364
RHSA-2021_4364
RLSA-2021:4364
SUSE-SU-2021:3593-1
SUSE-SU-2021:3616-1
SUSE-SU-2022:0934-1

Affected Products

Alt Linux
Almalinux
Centos
Debian
Gnu Binutils
Red Hat
Rocky Linux
Suse