{"id":"ALPINE-CVE-2021-40153","details":"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.","modified":"2026-08-27T22:18:01.648723833Z","published":"2021-08-27T15:15:09.657Z","upstream":["CVE-2021-40153"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-40153"}],"affected":[{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.11","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.12","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.13","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.14","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.15","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}},{"package":{"name":"squashfs-tools","ecosystem":"Alpine:v3.24","purl":"pkg:apk/alpine/squashfs-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40153.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"}]}