# CVE-2026-29509: Patool < 4.0.5 Path Traversal via safe_extract() Function

- Severity: Medium 5.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 22% of CVEs (2026-12-01)
- Published: 2026-06-26T19:31:07.165Z
- Modified: 2026-11-08T14:01:53.523Z
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: VulnCheck

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

(As written by CVE List.)

## Affected

- wummel patool: before 4.0.5

## Every score

- VulnCheck: CVSS:4.0 5.3 Medium `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`
- VulnCheck: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`

## References

- <https://github.com/wummel/patool/releases/tag/4.0.5> (patch, release-notes)
- <https://github.com/wummel/patool/blob/main/doc/changelog.txt> (release-notes)
- <https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-29509](https://www.cve.org/CVERecord?id=CVE-2026-29509), CVE Terms of Use, modified 2026-11-08
- NVD: [CVE-2026-29509](https://nvd.nist.gov/vuln/detail/CVE-2026-29509), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-29509 · Whole record: https://cve.day/CVE-2026-29509.json · Rebuilt by cve.day 2026-11-25T22:59:26.515Z
