CVE-2026-65320: fastcore through 2.2.44 Path Traversal via untar_dir Tar Extraction
fastcore through 2.2.44 contains a path traversal vulnerability in the fastcore.xtras.untardir() archive extraction helper that allows attackers who supply a crafted tar archive to write files outside the intended extraction directory. The internal unpack() function passes the archive to shutil.unpackarchive() without a tar extraction filter, member path validation, or a containment check, so archive members with absolute paths or ../ traversal sequences are written to arbitrary locations writable by the application process when running on Python versions before 3.14. Applications that extract untrusted archives with untardir() can have application files, configuration, or importable code overwritten, which can lead to code execution, data modification, or denial of service.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pythonto a version that resolves this vulnerability.Fixed in 3.14
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Applications using fastcore through 2.2.44 are exposed if they call fastcore.xtras.untar_dir() on attacker-controlled or otherwise untrusted tar archives. The described arbitrary-write behavior applies when the application runs on Python versions before 3.14.
What does an attacker need to exploit it?
An attacker needs to provide a crafted tar archive that the application extracts through untar_dir(). The archive can contain absolute member paths or ../ traversal sequences targeting locations writable by the application process.
Are applications affected by default?
The issue is not triggered merely by installing fastcore. Exposure depends on an application using untar_dir() to extract untrusted archives.
What can be done if patching is not immediately possible?
Do not pass untrusted tar archives to untar_dir(). If archive extraction must continue, isolate extraction so the process cannot write to sensitive application, configuration, or importable-code locations.
How can teams determine whether they may already be affected?
Review uses of fastcore.xtras.untar_dir() and identify whether untrusted archives can reach it, especially on Python versions before 3.14. Investigate unexpected changes to files writable by the extracting process, including application files, configuration, and importable code.