{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "4.0.5"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "DESCRIPTION",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3a6595327174c37937bb8af5c9cf6ad9d0ce79cc"
            }
          ],
          "repo": "https://github.com/wummel/patool",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-22"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/29xxx/CVE-2026-29509.json"
  },
  "details": "Patool before 4.0.5 contains a path traversal vulnerability in the safe_extract() function in patoolib/programs/py_tarfile.py when running on Python before 3.12, where the is_within_directory() helper uses os.path.commonprefix() for character-level string comparison instead of path-level comparison, allowing a crafted archive member path to bypass the containment check. Attackers can supply a malicious archive with specially crafted member paths to write arbitrary files.",
  "id": "CVE-2026-29509",
  "modified": "2026-07-08T05:36:37.504129558Z",
  "published": "2026-06-26T19:31:07.165Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/29xxx/CVE-2026-29509.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/wummel/patool/blob/main/doc/changelog.txt"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-29509"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function"
    },
    {
      "type": "FIX",
      "url": "https://github.com/wummel/patool/releases/tag/4.0.5"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/wummel/patool"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Patool \u003c 4.0.5 Path Traversal via safe_extract() Function"
}