patool — security advisory
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.
- Products
- patool
- Affected versions
- 4.0.0-1, 4.0.1-1, 4.0.2-1, 4.0.3-1, 4.0.4-1
- Fixed versions
- 4.0.0-1+deb13u1, 4.0.5-0.1
- CVEs
- CVE-2026-29509
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 12:15 UTC · Revision 2
Source evidence
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.
osv:DEBIAN-CVE-2026-29509
patool
Fixed versions: 4.0.0-1+deb13u1
patool
Fixed versions: 4.0.5-0.1
Complete source record
{
"id": "9a0f360b448fe3523c16ee3b9fa148c61cb8df19c7ce8ae70bc3288cff198487",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-29509",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-29509",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2026-29509",
"products": [
{
"name": {
"value": "patool",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.0.0-1+deb13u1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "4.0.0-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "patool",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.0.5-0.1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": [
{
"value": "4.0.0-1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.1-1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.2-1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.3-1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.4-1",
"evidence": "/affected/1/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2026-29509",
"aliases": [
"DEBIAN-CVE-2026-29509"
],
"metrics": [
{
"type": "CVSS_V4",
"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.0.0-1+deb13u1"
}
]
}
],
"package": {
"name": "patool",
"purl": "pkg:deb/debian/patool?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"4.0.0-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-29509.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.0.5-0.1"
}
]
}
],
"package": {
"name": "patool",
"purl": "pkg:deb/debian/patool?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"4.0.0-1",
"4.0.1-1",
"4.0.2-1",
"4.0.3-1",
"4.0.4-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-29509.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-26T11:47:29.388390753Z",
"provider": "osv",
"upstream": [
"CVE-2026-29509"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-29509"
]
},
"related_cves": [
{
"value": "CVE-2026-29509",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 450745,
"published_at": "2026-06-26T20:16:54.093+00:00"
}