TechNews
Opening an untrusted HDF5 file with PyTables can run code, and there is no fixed release yet
PyTables unpickles some HDF5 attributes automatically, so reading metadata from a malicious .h5 file can run code (CVE-2026-134019). The pandas.read_hdf function is affected too, and the latest release, 3.11.1, has no fix.
9.8 CriticalPoC public
- Severity
- 9.8 Critical
CVSS 9.8, Critical - Status
- PoC public
- Product
- PyTables (the tables package for Python)
Am I affected?
Check your version- Affected
- tables 3.11.1 and earlier; the advisory also counts 3.12, which still unpickles by default
- Fixed in
- No fixed release yet (latest on PyPI and GitHub: 3.11.1)
What to do now:
- Do not open HDF5 files from untrusted sources with PyTables or pandas.read_hdf where the process can reach secrets or other systems. Use an isolated container.
- Once version 3.12 is available, open untrusted files with allow_pickle=False, or set tables.parameters.ALLOW_PICKLE = False.
- Find the pipelines, notebooks and services that accept .h5 files from users or download them from the internet.
A critical flaw in PyTables, a Python library for HDF5 data files, means that reading metadata from a malicious .h5 file can run the attacker’s code. The advisory, CVE-2026-134019, was published on Nov 30 and rated 9.8 under CVSS 3.1. As of Dec 1, no fixed version has been released.
The reach goes beyond PyTables users: pandas.read_hdf() builds on PyTables and reads the same attributes. The advisory lists “data pipelines, ML services, notebooks” as places where opening an untrusted file is routine.
Why a data file can run code
HDF5 files hold arrays and tables plus metadata called attributes. PyTables stores Python objects that are not simple values as pickled attributes. Pickle is Python’s built-in serialization format, and loading a pickle can run code.
When it reads an attribute, PyTables guesses whether it is a pickle: any byte-string attribute that ends with a dot is treated as one and passed to pickle.loads(), with no allowlist and no safe unpickler. An attacker who controls the file can plant an attribute that runs a command as soon as a program reads it. The advisory’s proof of concept, tested on PyTables 3.11.1 with Python 3.12, creates a file on the victim’s system just by reading one attribute.
“HDF5 is widely perceived as a safe, code-free data format,” the advisory notes, which is why users do not expect metadata to run code. It compares the problem to a 2019 NumPy flaw, CVE-2019-6446, after which NumPy stopped loading pickles in np.load by default.
No fixed release yet
According to the advisory, PyTables 3.12 adds a way to turn automatic unpickling off, per file with allow_pickle=False or for all newly opened files with tables.parameters.ALLOW_PICKLE = False. The same per-file option can be passed through pandas, as in pandas.read_hdf(..., allow_pickle=False). Unpickling stays on by default in 3.12 for compatibility, and the advisory says it “is expected to be disabled by default in v3.13”.
As of Dec 1, the latest release on PyPI and on GitHub is still 3.11.1, from March 2026, so the opt-out is not yet available to most users. GitHub’s advisory database lists no patched version.
What to do now
Until a release with the opt-out ships, treat HDF5 files from outside your organization like code: do not open them with PyTables or pandas.read_hdf in a process that can reach secrets or other systems. When 3.12 is released, turn unpickling off for untrusted files.
Sources
- Topics
- Vulnerabilities
- Supply chain
Spotted a mistake? Report an error