CVE-2021-40153: Path Traversal

Published Aug 27, 2021
·
Updated

squashfsopendir 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.

Other sources

squashfsopendir in unsquash-1.c in Squashfs-Tools versions before 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.

Reference: https://github.com/plougher/squashfs-tools/issues/72

Upstream patch: https://github.com/plougher/squashfs-tools/commit/79b5a555058eef4e1e7ff220c344d39f8cd09646

— Red Hat

Affected Software

9 affected componentsFixes available
debian/squashfs-tools
1:4.3-12+deb10u21:4.4-2+deb11u21:4.5.1-11:4.6.1-1
redhat/squashfs-tools<4.5
4.5
Squashfs-tools Project Squashfs-tools=4.5
Fedoraproject Fedora=34
Debian Debian Linux=9.0
Debian Debian Linux=10.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
Fedoraproject Fedora=33

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/squashfs-tools to a version that resolves this vulnerability.

    Fixed in 1:4.3-12+deb10u2Fixed in 1:4.4-2+deb11u2Fixed in 1:4.5.1-1Fixed in 1:4.6.1-1
  2. Upgrade

    Upgrade redhat/squashfs-tools to a version that resolves this vulnerability.

    Fixed in 4.5
  3. Upgrade

    Upgrade squashfs-tools to a version that resolves this vulnerability.

    Fixed in 4.5Patch commit/79b5a555058eef4e1e7ff220c344d39f8cd09646

Event History

Aug 27, 2021
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the vulnerability ID for this vulnerability?

The vulnerability ID for this vulnerability is CVE-2021-40153.

2

What is the severity of CVE-2021-40153?

The severity of CVE-2021-40153 is high with a CVSS score of 8.1.

3

Which software is affected by CVE-2021-40153?

The software affected by CVE-2021-40153 includes Squashfs-Tools version 4.5 and Debian Linux versions 9.0 and 10.0.

4

How does CVE-2021-40153 exploit work?

CVE-2021-40153 allows writing to locations outside of the destination directory by not validating the filename for traversal.

5

Is there a fix available for CVE-2021-40153?

Yes, the fix for CVE-2021-40153 is available. Please refer to the references for more information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203