Vulnerability · Published Aug 27, 2021 · Assigned by mitre
CVE-2021-40153
High 8.1
In plain English
A high-severity security flaw in the squashfs-tools package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.5% (higher than 85% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)8.1High
Exploit odds (30 days)2.5%top 15.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | squashfs-tools | 4.3-21.el8 | ALSA-2024:3139 |
| AlmaLinux:9 | squashfs-tools | 4.4-10.git1.el9 | ALSA-2024:2396 |
| Alpine:v3.20 | squashfs-tools | 4.5-r0 | ALPINE-CVE-2021-40153 |
| Alpine:v3.21 | squashfs-tools | 4.5-r0 | ALPINE-CVE-2021-40153 |
| Alpine:v3.22 | squashfs-tools | 4.5-r0 | ALPINE-CVE-2021-40153 |
| Alpine:v3.23 | squashfs-tools | 4.5-r0 | ALPINE-CVE-2021-40153 |
| Alpine:v3.24 | squashfs-tools | 4.5-r0 | ALPINE-CVE-2021-40153 |
| Debian:12 | squashfs-tools | 1:4.5-2 | DEBIAN-CVE-2021-40153 |
| Debian:13 | squashfs-tools | 1:4.5-2 | DEBIAN-CVE-2021-40153 |
| Debian:14 | squashfs-tools | 1:4.5-2 | DEBIAN-CVE-2021-40153 |
| Rocky Linux:8 | squashfs-tools | 0:4.3-21.el8 | RLSA-2024:3139 |
| Rocky Linux:9 | squashfs-tools | 0:4.4-10.git1.el9 | RLSA-2024:2396 |
Affected products (as reported)
References
- https://github.com/plougher/squashfs-tools/commit/79b5a555058eef4e1e7ff220c344d39f8cd09646
- https://github.com/plougher/squashfs-tools/issues/72
- https://bugs.launchpad.net/ubuntu/+source/squashfs-tools/+bug/1941790
- FEDORA-2021-cdbd827c1e vendor-advisory
- [debian-lts-announce] 20210831 [SECURITY] [DLA 2752-1] squashfs-tools security update mailing-list
- DSA-4967 vendor-advisory
- FEDORA-2021-9fb6da134f vendor-advisory
- GLSA-202305-29 vendor-advisory