CVE-2021-23177 Path traversal in libarchive
A local attacker can exploit improper link resolution in libarchive to modify file ACLs and escalate privileges by tricking a user into extracting a malicious archive.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-23177?
CVE-2021-23177 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 23 Aug 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
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: CWE-59
Which versions are affected by CVE-2021-23177?
It affects 13 products.
Linux distribution packages (6)
libarchive SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 3.4.2-150200.4.9.1 |
libarchive SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 3.5.1-150400.3.6.1 |
libarchive SUSE:Linux Enterprise Module for Development Tools 15 SP3 | All versions | 3.4.2-150200.4.9.1 |
libarchive SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 3.5.1-150400.3.6.1 |
libarchive openSUSE:Leap 15.3 | All versions | 3.4.2-150200.4.9.1 |
libarchive openSUSE:Leap 15.4 | All versions | 3.5.1-150400.3.6.1 |
Products include Debian Debian Linux, Fedoraproject Fedora, Libarchive Libarchive, Redhat Codeready Linux Builder, Redhat Enterprise Linux, Redhat Enterprise Linux Eus and 7 more.
How do I fix CVE-2021-23177?
Apply the vendor's patch.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-23177 being exploited?
There is no known exploitation of CVE-2021-23177 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2021-23177, GHSA-fq9q-7wp8-gpr7, JLSEC-2025-235, SUSE-SU-2022:3306-1, SUSE-SU-2022:3393-1, UBUNTU-CVE-2021-23177.