Skip to content
Fencer Vulns
high 8.1

CVE-2021-40153 json

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 creat…

published 2021-08-27 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-27338

cvss
8.1
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.5%
EPSS 2.5% chance of exploitation in 30 days, percentile 84%
public exploits
0
none known

Summary

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.

Patch / fix

  • squashfs-tools Debian 14, Debian 13, Debian 12 1:4.5-2

debian advisories DEBIAN-CVE-2021-40153

  • squashfs-tools Ubuntu 18.04 LTS 1:4.3-6ubuntu0.18.04.3
  • squashfs-tools Ubuntu 20.04 LTS 1:4.4-1ubuntu0.1
  • squashfs-tools Ubuntu Pro 16.04 LTS 1:4.3-3ubuntu2.16.04.3+esm1

ubuntu advisories UBUNTU-CVE-2021-40153

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • squashfs-tools RHEL 8 4.3-21.el8
  • squashfs-tools RHEL 9 4.4-10.git1.el9

red hat advisories RHSA-2024:3139RHSA-2024:2396

  • squashfs SLE Module for Basesystem 15 SP5, SLE Module for Basesystem 15 SP4, SLE Micro 5.5 +15 more 4.6.1-150300.3.3.1
  • squashfs SLES for SAP 12 SP5, SLES 12 SP5 4.6.1-8.3.2

suse advisories SUSE-SU-2024:2463-1SUSE-SU-2023:4591-1SUSE-SU-2023:4424-1

  • squashfs openSUSE Tumbleweed 4.6.1-2.1

opensuse advisories openSUSE-SU-2024:13035-1

  • squashfs-tools AlmaLinux 8 4.3-21.el8
  • squashfs-tools AlmaLinux 9 4.4-10.git1.el9

almalinux advisories ALSA-2024:3139ALSA-2024:2396

  • squashfs-tools Rocky Linux 9 4.4-10.git1.el9
  • squashfs-tools Rocky Linux 8 4.3-21.el8

rocky linux advisories RLSA-2024:2396RLSA-2024:3139

  • squashfs-tools Alpine 3.24, Alpine 3.23, Alpine 3.22 +11 more 4.5-r0

alpine advisories ALPINE-CVE-2021-40153

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • squashfs-tools CBL-Mariner 2.0 4.5.1-1

azure linux advisories AZL-7463

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

  • squashfs-tools Arch Linux 4.5-1

arch linux advisories AVG-2328

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-40153 updated cvss 8.1

squashfs-tools: unvalidated filepaths allow writing outside of destination

  • Red Hat Enterprise Linux 6 squashfs-tools
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 7 squashfs-tools
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux BaseOS (v. 8) squashfs-tools 4.3-21.el8
    fixed: vendor fix RHSA-2024:3139
  • Red Hat Enterprise Linux BaseOS (v. 9) squashfs-tools 4.4-10.git1.el9
    fixed: vendor fix RHSA-2024:2396

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.50% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/plougher/squashfs-tools/issues/72 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 8.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
NVD 2.0 5.8 AV:N/AC:M/Au:N/C:N/I:P/A:P

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.