- Severity: CRITICAL
- CVE: CVE-2026-134019
- Ecosystems: pip
- Packages: tables
### Summary
PyTables stores non-primitive Python objects as pickled HDF5 attributes and, on read, auto-unpickles them using a heuristic (a `numpy.bytes_` scalar whose value ends in `b’.’` is treated as a pickle) with no allowlist and no safe unpickler. As a result, merely opening a malicious `.h5` file and reading a metadata attribute can execute attacker-controlled code. HDF5 is widely perceived as a safe, code-free data format (like `.npy` / Parquet), so consumers do not expect that reading metadata runs code.
### Affected
`tables` (PyTables) ` code execution
“`
Observed: after crafting, no sentinel; after the victim reads one attribute, the sentinel file is created. `pip-audit` on 3.11.1 reported no known vulnerabilities. The stored pickle references `posix.system` (`os.system`), so the payload is portable and needs none of the attacker’s classes on the victim side.
Attachments:
– [pytables_attacker.py](https://github.com/user-attachments/files/30632202/pytables_attacker.py)
– [pytables_victim.py](https://github.com/user-attachments/files/30632204/pytables_victim.py)
### Impact
Opening or reading an untrusted `.h5` file (a routine operation, for example in data pipelines, ML services, notebooks, or via `pandas.read_hdf`) results in arbitrary code execution.
### Workaround / Mitigation (v3.12)
v3.12 still unpickles automatically by default. For untrusted files, disable it per file:
“`python
import tables
with tables.open_file(“untrusted.h5”, allow_pickle=False) as…
Source: GitHub Security Advisories · 2026-11-30