CVE Vulnerabilities

CVE-2021-23177

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

Published: Aug 23, 2022 | Modified: Nov 21, 2024
CVSS 3.x
7.8
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.3 MODERATE
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
Ubuntu
LOW
root.io logo minimus.io logo echo.ai logo

An improper link resolution flaw while extracting an archive can lead to changing the access control list (ACL) of the target of the link. An attacker may provide a malicious archive to a victim user, who would trigger this flaw when trying to extract the archive. A local attacker may use this flaw to change the ACL of a file on the system and gain more privileges.

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
LibarchiveLibarchive*3.5.2 (excluding)
Red Hat Enterprise Linux 8RedHatlibarchive-0:3.3.3-3.el8_5*
LibarchiveUbuntubionic*
LibarchiveUbuntuesm-infra/bionic*
LibarchiveUbuntuesm-infra/focal*
LibarchiveUbuntufocal*
LibarchiveUbuntuhirsute*
LibarchiveUbuntuimpish*
LibarchiveUbuntutrusty*
LibarchiveUbuntutrusty/esm*
LibarchiveUbuntuupstream*
LibarchiveUbuntuxenial*

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