CVE Vulnerabilities

CVE-2021-20197

Improper Link Resolution Before File Access ('Link Following')

Published: Mar 26, 2021 | Modified: Dec 03, 2025
CVSS 3.x
6.3
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
CVSS 2.x
3.3 LOW
AV:L/AC:M/Au:N/C:P/I:P/A:N
RedHat/V2
RedHat/V3
4.2 MODERATE
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N
Ubuntu
LOW
root.io logo minimus.io logo echo.ai logo

There is an open race window when writing output in the following utilities in GNU binutils version 2.35 and earlier:ar, objcopy, strip, ranlib. When these utilities are run as a privileged user (presumably as part of a script updating binaries across different users), an unprivileged user can trick these utilities into getting ownership of arbitrary files through a symlink.

Weakness

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Affected Software

NameVendorStart VersionEnd Version
BinutilsGnu*2.35 (including)
Red Hat Enterprise Linux 8RedHatbinutils-0:2.30-108.el8*
Red Hat Enterprise Linux 8RedHatbinutils-0:2.30-108.el8*
BinutilsUbuntubionic*
BinutilsUbuntuesm-infra-legacy/trusty*
BinutilsUbuntuesm-infra/bionic*
BinutilsUbuntuesm-infra/focal*
BinutilsUbuntuesm-infra/xenial*
BinutilsUbuntufocal*
BinutilsUbuntugroovy*
BinutilsUbuntuprecise/esm*
BinutilsUbuntutrusty*
BinutilsUbuntutrusty/esm*
BinutilsUbuntuupstream*
BinutilsUbuntuxenial*

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References