CVE-2021-40153Path Traversal in Squashfs-tools

Severity
8.1HIGHNVD
EPSS
0.5%
top 32.28%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedAug 27
Latest updateMay 24

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.

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:HExploitability: 2.8 | Impact: 5.2

Affected Packages7 packages

debiandebian/squashfs-tools< squashfs-tools 1:4.5-2 (bookworm)+1
Debiansquashfs-tools_project/squashfs-tools< 1:4.4-2+deb11u2+7
Ubuntusquashfs-tools_project/squashfs-tools< 1:4.3-3ubuntu2.16.04.3+esm1

Also affects: Debian Linux 10.0, 11.0, 9.0, Fedora 33, 34, Enterprise Linux 7.0, 8.0

Patches

🔴Vulnerability Details

5
GHSA
GHSA-98f5-57cr-27p7: squashfs_opendir in unsquash-12022-05-24
GHSA
GHSA-f6m6-9fjw-69qm: squashfs_opendir in unsquash-22022-05-24
OSV
squashfs-tools vulnerabilities2021-09-15
OSV
CVE-2021-41072: squashfs_opendir in unsquash-22021-09-14
OSV
CVE-2021-40153: squashfs_opendir in unsquash-12021-08-27

📋Vendor Advisories

8
Ubuntu
Squashfs-Tools vulnerabilities2021-09-15
Red Hat
squashfs-tools: possible Directory Traversal via symbolic link2021-09-14
Microsoft
squashfs_opendir in unsquash-2.c in Squashfs-Tools 4.5 allows Directory Traversal a different vulnerability than CVE-2021-40153. A squashfs filesystem that has been crafted to include a symbolic link 2021-09-14
Ubuntu
Squashfs-Tools vulnerability2021-08-31
Microsoft
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 valid2021-08-10
CVE-2021-40153 — Path Traversal in Squashfs-tools | cvebase