Directory Traversal Affecting squashfs-tools package, versions <0:4.3-21.el8


Severity

Recommended
medium

Based on CentOS security rating.

Threat Intelligence

EPSS
0.43% (62nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Directory Traversal vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CENTOS8-SQUASHFSTOOLS-1971981
  • published3 Sept 2021
  • disclosed10 Sept 2019

Introduced: 10 Sep 2019

CVE-2021-40153  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

Upgrade Centos:8 squashfs-tools to version 0:4.3-21.el8 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream squashfs-tools package and not the squashfs-tools package as distributed by Centos. See How to fix? for Centos:8 relevant fixed versions and status.

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 Base Scores

version 3.1