Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41072

squashfs_opendir in unsquash-2.c in Squashfs-Tools 4.5 allows Directory Traversal, a different vulnerability than CVE-2021-40153. A squashfs filesystem that has been crafted to include a symbolic link and then contents under the same filename in a filesystem can cause unsquashfs to first create the symbolic link pointing outside the expected directory, and then the subsequent write operation will cause the unsquashfs process to write through the symbolic link elsewhere in the filesystem.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41072
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:53 UTC · Revision 1

Source evidence

CVE-2021-41072

core-osv · Original source

Published 14 Sept 2021, 01:15 UTC

squashfs_opendir in unsquash-2.c in Squashfs-Tools 4.5 allows Directory Traversal, a different vulnerability than CVE-2021-40153. A squashfs filesystem that has been crafted to include a symbolic link and then contents under the same filename in a filesystem can cause unsquashfs to first create the symbolic link pointing outside the expected directory, and then the subsequent write operation will cause the unsquashfs process to write through the symbolic link elsewhere in the filesystem.

osv:CVE-2021-41072
Complete source record
{
  "id": "e193d6f3fdc79ba2eaa08d85088142c108faba6ade943dd7306150bab9001d36",
  "url": "https://osv.dev/vulnerability/CVE-2021-41072",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41072",
    "summary": "squashfs_opendir in unsquash-2.c in Squashfs-Tools 4.5 allows Directory Traversal, a different vulnerability than CVE-2021-40153. A squashfs filesystem that has been crafted to include a symbolic link and then contents under the same filename in a filesystem can cause unsquashfs to first create the symbolic link pointing outside the expected directory, and then the subsequent write operation will cause the unsquashfs process to write through the symbolic link elsewhere in the filesystem.",
    "evidence": "osv:CVE-2021-41072",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-41072",
      "aliases": [
        "CVE-2021-41072"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/plougher/squashfs-tools",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0496d7c3de3e09da37ba492081c86159806ebb07"
                },
                {
                  "last_affected": "0496d7c3de3e09da37ba492081c86159806ebb07"
                },
                {
                  "fixed": "e0485802ec72996c20026da320650d8362f555bd"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:squashfs-tools_project:squashfs-tools:4.5:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.5"
                      },
                      {
                        "last_affected": "4.5"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e0485802ec72996c20026da320650d8362f555bd"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "4.5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41072.json",
            "vanir_signatures": [
              {
                "id": "CVE-2021-41072-17bef277",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "13826501275751200352062856063484710912",
                    "310321498175082041215183790365799830598",
                    "222252199053251366417172446049972134779"
                  ]
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-4.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-17d236ac",
                "digest": {
                  "length": 2732,
                  "function_hash": "18901525040218552686384788208234690139"
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-2.c",
                  "function": "squashfs_opendir"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-517a38af",
                "digest": {
                  "length": 1204,
                  "function_hash": "54792938322389362071123182180987984409"
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-2.c",
                  "function": "read_super_2"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-8756ee07",
                "digest": {
                  "length": 2732,
                  "function_hash": "18901525040218552686384788208234690139"
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-1.c",
                  "function": "squashfs_opendir"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-930e8cbd",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "89582843057714310302560616203867031271",
                    "49499559178388147018567964199199003077"
                  ]
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquashfs.h"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-a593c95f",
                "digest": {
                  "length": 2736,
                  "function_hash": "310221983440334615105753322885496648658"
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-3.c",
                  "function": "squashfs_opendir"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-bde9ce70",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "321819792665477290116542811770824633115",
                    "153109692933111748050391633369134751289",
                    "200445461191816545489245548579996642577",
                    "109435949105249211745989750370743912367",
                    "13826501275751200352062856063484710912",
                    "310321498175082041215183790365799830598",
                    "222252199053251366417172446049972134779",
                    "48309106085847685141102099689057574146",
                    "301385753643948902204006603759959075192",
                    "126113801197783751144936314844357774461",
                    "184633766433689322390316538862612286887"
                  ]
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-2.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-c792fca3",
                "digest": {
                  "length": 2502,
                  "function_hash": "95133666285201796399228902473090162087"
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-4.c",
                  "function": "squashfs_opendir"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-e1b69ee7",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "13826501275751200352062856063484710912",
                    "310321498175082041215183790365799830598",
                    "222252199053251366417172446049972134779"
                  ]
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-3.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2021-41072-e8094c28",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "13826501275751200352062856063484710912",
                    "310321498175082041215183790365799830598",
                    "222252199053251366417172446049972134779"
                  ]
                },
                "source": "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
                "target": {
                  "file": "squashfs-tools/unsquash-1.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T14:29:24Z"
          }
        }
      ],
      "modified": "2026-10-20T14:29:24.009665260Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2021/10/msg00017.html",
        "https://security.gentoo.org/glsa/202305-29",
        "https://www.debian.org/security/2021/dsa-4987",
        "https://github.com/plougher/squashfs-tools/commit/e0485802ec72996c20026da320650d8362f555bd",
        "https://github.com/plougher/squashfs-tools/issues/72#issuecomment-913833405"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  },
                  {
                    "introduced": "10.0"
                  },
                  {
                    "last_affected": "10.0"
                  },
                  {
                    "introduced": "11.0"
                  },
                  {
                    "last_affected": "11.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2021-41072",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 389069,
  "published_at": "2021-09-14T01:15:07.747+00:00"
}