CVE-2026-134019 in PyTables
Summary
by MITRE • 11/24/2026
PyTables is a Python package to manage extremely large amounts of data. In 3.11.1 and earlier, tables/attributeset.py treats a NumPy bytes scalar ending in a period as a pickled Python object and calls pickle.loads() when the attribute is accessed through AttributeSet.__getattr__ or AttributeSet.__getitem__. Opening an attacker-controlled HDF5 file and reading an affected metadata attribute can execute attacker-controlled code in the consumer’s process. No fixed version is available as of this review.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/24/2026
PyTables serves as a critical Python library designed for managing extremely large amounts of data stored in Hierarchical Data Format (HDF) files, which are widely used in scientific computing and data analysis workflows. The vulnerability identified within versions 3.11.1 and earlier resides specifically within the attribute handling mechanism located in the tables/attributeset.py module. This component is responsible for reading metadata attributes associated with datasets or groups within an HDF5 file structure. Under normal operational conditions, these attributes store simple scalar values such as integers, floats, strings, or boolean flags that describe properties of the data being managed. However, due to a flaw in how the library interprets certain byte sequences during deserialization, it inadvertently creates a pathway for arbitrary code execution when processing untrusted input files.
The technical root cause of this vulnerability is an insecure deserialization practice involving Python's pickle module. When an attribute value is accessed via AttributeSet._getattr_ or AttributeSet._getitem_, PyTables checks if the underlying NumPy bytes scalar ends with a period character. If this condition is met, the library assumes that the data represents a pickled Python object and proceeds to call pickle.loads() on it without any prior validation or sanitization of the content. This behavior conflates standard attribute storage with complex object serialization formats. Because pickle.loads() can reconstruct arbitrary Python objects from byte streams, an attacker who crafts a malicious HDF5 file containing specific metadata attributes ending in periods can embed serialized payloads that execute system commands or perform other destructive actions when loaded by a victim application using PyTables.
The operational impact of this vulnerability is severe, classified as Remote Code Execution (RCE) if the affected software processes files from untrusted sources. Since many data processing pipelines automatically ingest HDF5 files generated by external partners, sensors, or public repositories, an attacker can distribute maliciously crafted files that trigger code execution simply by being opened and having their attributes read. This bypasses traditional network-based defenses because the attack vector is file-based rather than network-request based. The lack of a fixed version as of the review indicates that users must rely on workarounds or alternative libraries until an official patch is released, leaving systems exposed to potential exploitation in environments where data integrity cannot be guaranteed prior to processing.
From a classification perspective, this vulnerability aligns with CWE-502, which describes Deserialization of Untrusted Data. It also maps to MITRE ATT&CK technique T1610, specifically the Dump and Dump from Remote process sub-technique if used for data exfiltration, or more broadly to Initial Execution vectors where malicious code is introduced via file ingestion. The core issue lies in the assumption that specific byte patterns indicate safe deserialization targets without verifying the source trustworthiness or validating the structure of the serialized object against a whitelist of expected types.
To mitigate this risk in the absence of an official patch, organizations should implement strict input validation controls at the application layer before passing HDF5 files to PyTables for processing. This includes scanning incoming files for metadata attributes that end with periods and rejecting or sanitizing them prior to access. Additionally, deploying file integrity monitoring solutions can help detect unusual patterns in data ingestion pipelines. Where possible, applications should switch to safer serialization formats such as JSON or MessagePack for storing complex metadata instead of relying on pickle-based mechanisms within the HDF5 attribute store. Restricting the execution environment using sandboxing techniques like containers or virtual machines can also limit the blast radius if a malicious file is inadvertently processed, ensuring that any potential code execution remains isolated from critical system resources and network access.