cve.bz

CVE-2021-40153 Path traversal

8.1 highExploit referenceEPSS 2.5%Fix available

High (8.1). EPSS 2.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
EPSS
2.5% (unchanged from 2.5% a week ago; 2.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 85th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-40153 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-40153?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-40153?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-40153 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
squashfs-tools_project:squashfs-tools4.5
fedoraproject:fedora34
debian:debian_linux9.0
debian:debian_linux10.0
redhat:enterprise_linux7.0
redhat:enterprise_linux8.0
fedoraproject:fedora33

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9squashfs-tools1:4.3-3+deb9u2DLA-2752-1
Debian10squashfs-tools1:4.3-12+deb10u1DSA-4967-1
Debian11squashfs-tools1:4.4-2+deb11u1DSA-4967-1
Debian12, 13, 14squashfs-tools1:4.5-2DEBIAN-CVE-2021-40153
Ubuntu18.04:LTSsquashfs-tools1:4.3-6ubuntu0.18.04.3UBUNTU-CVE-2021-40153 USN-5057-1
Ubuntu20.04:LTSsquashfs-tools1:4.4-1ubuntu0.1UBUNTU-CVE-2021-40153 USN-5057-1
UbuntuPro:16.04:LTSsquashfs-tools1:4.3-3ubuntu2.16.04.3+esm1UBUNTU-CVE-2021-40153 USN-5078-2
Red Hatenterprise_linux:8::baseossquashfs-tools, squashfs-tools-debuginfo, squashfs-tools-debugsource0:4.3-21.el8RHSA-2024:3139
Red Hatenterprise_linux:9::baseossquashfs-tools, squashfs-tools-debuginfo, squashfs-tools-debugsource0:4.4-10.git1.el9RHSA-2024:2396
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-ESPOS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 11 moresquashfs4.6.1-150300.3.3.1SUSE-SU-2023:4591-1
SUSELinux Enterprise Micro 5.5squashfs4.6.1-150300.3.3.1SUSE-SU-2024:2463-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5squashfs4.6.1-8.3.2SUSE-SU-2023:4424-1
openSUSELeap 15.4, Leap 15.5, Leap Micro 5.3 and 1 moresquashfs4.6.1-150300.3.3.1SUSE-SU-2023:4591-1
openSUSETumbleweedsquashfs4.6.1-2.1openSUSE-SU-2024:13035-1
AlmaLinux8squashfs-tools4.3-21.el8ALSA-2024:3139
AlmaLinux9squashfs-tools4.4-10.git1.el9ALSA-2024:2396
Rocky Linux8squashfs-tools0:4.3-21.el8RLSA-2024:3139
Rocky Linux9squashfs-tools0:4.4-10.git1.el9RLSA-2024:2396
Alpinev3.11, v3.12, v3.13 and 11 moresquashfs-tools4.5-r0ALPINE-CVE-2021-40153
Azure Linux2squashfs-tools4.5.1-1AZL-7463

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8squashfs-tools-0:4.3-21.el8Fixed 2024-05-22RHSA-2024:3139
Red Hat Enterprise Linux 9squashfs-tools-0:4.4-10.git1.el9Fixed 2024-04-30RHSA-2024:2396
Red Hat Enterprise Linux 6squashfs-toolsOut of support scope
Red Hat Enterprise Linux 7squashfs-toolsWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-40153.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON