Skip to content
CriticalVulnerability

GHSA-3r7g-mq96-7hhc: PyTables: Remote code execution via auto-unpickled HDF5 attributes

Published
Record updated
View JSON
Affected
  • tables <= 3.11.1
Fixed in
No fixed version was stated when the source was last read.
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.9%

Summary

PyTables auto-unpickles HDF5 attributes that look like pickles, using a heuristic that treats any numpy.bytes_ value ending in b'.' as a pickle, with no allowlist or safe unpickler. Affected versions are tables (PyTables) <= 3.12, and pandas.read_hdf() inherits the exposure. Opening an untrusted .h5 file and reading one attribute runs attacker-controlled code, as shown by a proof of concept on tables==3.11.1 that creates a sentinel file.

Mitigation

v3.12 adds an opt-out via allow_pickle=False per file (tables.open_file) or tables.parameters.ALLOW_PICKLE = False globally, and pandas.read_hdf(..., allow_pickle=False) or pandas.HDFStore(..., allow_pickle=False) for pandas. Automatic unpickling remains enabled by default in v3.12 and is expected to be disabled by default in v3.13.