CVE-2026-123815
Improper tar extraction lets crafted archive create device files or FIFOs
- CVSS 9.4
- CWE-22
- Input Validation and Sanitization
- Remote
pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev102, UnTar._safe_extractall in src/pyload/plugins/extractors/UnTar.py validates archive member paths and link targets but does not call TarInfo.isdev to reject special tar member types before calling tarfile.extractall. On supported Python 3.9 through 3.13 runtimes, tarfile defaults to the fully_trusted extraction filter, so a user with ADD and STATUS permissions can cause extraction of a crafted archive containing character devices, block devices, or FIFOs. Python 3.14 defaults to a safe extraction filter. When pyLoad runs with operating-system privileges that permit device creation, including the official root-based Docker deployment, the archive can expose raw devices and compromise the host. Non-root deployments can still create FIFOs that cause hangs or IPC confusion. This issue is fixed in version 0.5.0b3.dev102.
- CWE
- CWE-22
- CVSS base score
- 9.4
- Published
- 2026-11-09
- OWASP
- A08 Software and Data Integrity Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Privilege Escalation
- Affected component
- pyLoad
- Fixed by upgrading
- Yes
Solution
Upgrade pyLoad to version 0.5.0b3.dev102 (or later).
Vulnerable code sample
import tarfile
import os
class UnTar:
def __init__(self, archive_path, dest_dir):
self.archive_path = archive_path
self.dest_dir = dest_dir
def _safe_extractall(self):
with tarfile.open(self.archive_path, "r:*") as tar:
for member in tar.getmembers():
# VULNERABLE: does not reject device nodes before extraction
self._validate_member(member)
tar.extractall(self.dest_dir)
def _validate_member(self, member):
# reject path traversal
member_path = os.path.normpath(os.path.join(self.dest_dir, member.name))
if not member_path.startswith(os.path.abspath(self.dest_dir)):
raise Exception("Path traversal detected")
# reject symlinks that point outside the destination
if member.issym() or member.islnk():
target = member.linkname
target_path = os.path.normpath(os.path.join(self.dest_dir, target))
if not target_path.startswith(os.path.abspath(self.dest_dir)):
raise Exception("Unsafe symlink")Patched code sample
import tarfile
import os
class UnTar:
def __init__(self, archive_path, dest_dir):
self.archive_path = archive_path
self.dest_dir = dest_dir
def _safe_extractall(self):
with tarfile.open(self.archive_path, "r:*") as tar:
for member in tar.getmembers():
# FIX: reject device, block and fifo members before extraction
self._validate_member(member)
tar.extractall(self.dest_dir)
def _validate_member(self, member):
# reject path traversal
member_path = os.path.normpath(os.path.join(self.dest_dir, member.name))
if not member_path.startswith(os.path.abspath(self.dest_dir)):
raise Exception("Path traversal detected")
# reject symlinks that point outside the destination
if member.issym() or member.islnk():
target = member.linkname
target_path = os.path.normpath(os.path.join(self.dest_dir, target))
if not target_path.startswith(os.path.abspath(self.dest_dir)):
raise Exception("Unsafe symlink")
# reject special device types
if member.ischr() or member.isblk() or member.isfifo():
raise Exception("Device or FIFO not allowed")Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix GHSA-fr26-jjhm-638c security advisory (pyload/pyload)
src/pyload/plugins/extractors/UnTar.py,src/pyload/plugins/extractors/UnTar.py · UnTar._safe_extractall
Cite this entry
@misc{vaitp:cve2026123815,
title = {{Improper tar extraction lets crafted archive create device files or FIFOs}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-123815},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-123815/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
