PyTables auto-unpickle RCE: PyTables/pandas.read_hdf — opening a malicious .h5 file executes attacker code (CVE-2026-134019)
Severity: critical · Patch status: partial · Since 2026-10-03 · CVE-2019-6446, CVE-2026-134019
PyTables stores non-primitive Python objects as pickled HDF5 attributes and auto-unpickles them on read via a heuristic (any numpy.bytes attribute ending in b'.' is treated as a pickle), with no allowlist or safe unpickler. Merely opening a malicious .h5 file and reading a metadata attribute — including via pandas.readhdf() — executes attacker-controlled code (CVE-2026-134019, CVSS 9.8). All versions through 3.11.1 are affected with no opt-out; v3.12 adds allowpickle=False / ALLOWPICKLE=False but keeps automatic unpickling enabled by default, with default-off expected in v3.13. A public PoC (verified on tables==3.11.1) demonstrates arbitrary command execution; no in-the-wild exploitation is reported. pip-audit does not flag it, so organisations must act manually.
What to do
- Upgrade to tables 3.12 and set tables.parameters.ALLOW_PICKLE = False globally, or pass allow_pickle=False to every open_file/HDFStore/read_hdf call handling untrusted files
- Treat all .h5 files from untrusted sources as hostile; avoid reading their attributes until mitigated
- Pass allow_pickle=False through pandas (read_hdf/HDFStore) in data pipelines, ML services and notebooks
- Use ptdump (unpickling disabled by default) for inspection instead of programmatic attribute reads
- Add detection/monitoring for unexpected process execution following HDF5 file processing, since pip-audit does not flag this
Sources
All live incidents on Threat Watch