CVE-2021-40153 Path traversal in n/a
Squashfs-Tools allows path traversal during unsquash operations, enabling attackers to write files outside the intended destination directory.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-40153?
CVE-2021-40153 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 27 Aug 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
squashfs_opendir in unsquash-1.c in Squashfs-Tools 4.5 stores the filename in the directory entry; this is then used by unsquashfs to create the new file during the unsquash. The filename is not validated for traversal outside of the destination directory, and thus allows writing to locations outside of the destination.
Weakness: CWE-22
Which versions are affected by CVE-2021-40153?
It affects 4 products.
Linux distribution packages (1)
squashfs openSUSE:Tumbleweed | All versions | 4.6.1-2.1 |
Products include Debian Debian Linux, Fedoraproject Fedora, Redhat Enterprise Linux, Squashfs-Tools Project Squashfs-Tools.
How do I fix CVE-2021-40153?
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-40153 being exploited?
There is no known exploitation of CVE-2021-40153 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2021-40153, AZL-7463, CLSA-2025-1750782908, CLSA-2026-1777544697, CLSA-2026-1792439424, CLSA-2026-1792440720 and 7 more.