{"id":"CVE-2026-29509","state":"PUBLISHED","title":"Patool < 4.0.5 Path Traversal via safe_extract() Function","description":"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.","publishedAt":"2026-06-26T19:31:07.165Z","updatedAt":"2026-07-14T18:39:53.973Z","severity":{"score":5.3,"label":"Medium","version":"4.0","vector":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["wummel patool"],"affected":[{"vendor":"wummel","product":"patool","packageURL":"pkg:github/wummel/patool","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"4.0.5","versionType":"semver"}],"repo":"https://github.com/wummel/patool"}],"references":["https://github.com/wummel/patool/releases/tag/4.0.5","https://github.com/wummel/patool/blob/main/doc/changelog.txt","https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:11:31.369Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/29xxx/CVE-2026-29509.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-29509","state":"PUBLISHED","datePublished":"2026-06-26T19:31:07.165Z","dateUpdated":"2026-07-14T18:39:53.973Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-03-04T15:39:26.871Z"},"containers":{"cna":{"title":"Patool < 4.0.5 Path Traversal via safe_extract() Function","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"wummel","product":"patool","packageURL":"pkg:github/wummel/patool","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"4.0.5","versionType":"semver"}],"repo":"https://github.com/wummel/patool"}],"references":[{"url":"https://github.com/wummel/patool/releases/tag/4.0.5","tags":["patch"]},{"url":"https://github.com/wummel/patool/blob/main/doc/changelog.txt","tags":["release-notes"]},{"url":"https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"MEDIUM","baseScore":5.3,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","version":"3.1","baseSeverity":"MEDIUM","baseScore":5.4,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-07-14T18:39:53.973Z"},"tags":["x_open-source"],"datePublic":"2026-05-18T00:00:00.000Z","credits":[{"lang":"en","value":"CodeAnt AI Security","type":"finder"},{"lang":"en","value":"VulnCheck","type":"coordinator"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"vulncheck"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-27T03:03:15.517374Z","id":"CVE-2026-29509","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-27T03:03:25.595Z"}}]}}}