On this page (7 sections)

PyTables, the Python package published on PyPI as tables, automatically deserializes some HDF5 attributes with Python's pickle module. Opening an attacker-supplied .h5 file and reading one metadata attribute can therefore run attacker-controlled code inside your process. The issue is tracked as CVE-2026-134019 and rated critical (CVSS 9.8) in the GitHub advisory.

If you run data pipelines, notebooks, ML services or web back ends that read .h5 files from users, partners or downloads, or that call pandas.read_hdf on such files, this applies to you. At the time of writing, only the GitHub advisory covers this story, so treat details beyond it as unconfirmed.

What happened

PyTables can store non-primitive Python objects as pickled HDF5 attributes. When reading them back, it guesses which attributes are pickles using a simple heuristic: a NumPy bytes scalar whose value ends in a period is treated as a pickle and passed to pickle.loads(). There is no allowlist and no restricted unpickler, according to the advisory.

Python's pickle format can instruct the interpreter to call arbitrary functions while loading. That is why the Python documentation warns against unpickling untrusted data. The surprise here is that HDF5 is widely seen as a plain data format, similar to .npy or Parquet, so people do not expect that reading metadata can run code.

Technical details

The vulnerable logic is in tables/attributeset.py. Unpickling is reached when an attribute is accessed through AttributeSet.__getattr__ or AttributeSet.__getitem__, which covers the common pattern of reading node attributes such as a file's description or other metadata. The advisory notes that pandas.read_hdf() builds on PyTables and reads node attributes, which widens the reach to many pandas-based workflows.

The advisory's CVSS v3 vector lists network attack vector, low complexity, no privileges and no user interaction. In practice the attacker still needs your code to open their file and read an affected attribute, so real exposure depends on where your files come from.

The advisory reports that the author verified the behavior on tables 3.11.1 with Python 3.12, and that pip-audit on that version reported no known vulnerabilities, so dependency scanners may not flag this yet. We are not reproducing the proof of concept here.

Version information is inconsistent

The CVE record lists affected versions as <= 3.11.1 with no fixed version. The advisory body says <= 3.12, and explains that v3.12 adds an opt-out (allow_pickle=False, or ALLOW_PICKLE = False) but keeps automatic unpickling enabled by default for compatibility. The advisory says it is expected to be disabled by default in v3.13. That is a stated expectation, not a released fix, so do not assume any current release is safe by default.

Who is affected

  • Services that accept .h5 uploads or ingest HDF5 files from third parties, such as data portals, analytics back ends and ML inference or training pipelines.
  • Jupyter notebooks and scripts that open HDF5 files downloaded from the internet, shared drives or email.
  • Code that calls pandas.read_hdf() or pandas.HDFStore on files you do not fully control.
  • Build and CI jobs that load HDF5 fixtures or datasets from external repositories.

If your site is a typical CMS or store that never touches HDF5 files, you are very likely not exposed. Hosting administrators and agencies running Python services next to websites should still check, because code execution lands in the process that opened the file, with that process's permissions.

How to check your exposure

First find out whether the package is installed and which version. This read-only command lists the installed tables package in the current Python environment; look for a version of 3.11.1 or lower, or 3.12 without the opt-out configured.

Show the installed PyTables version (run inside each Python environment or container)Shell
pip show tables

Then search your code for places that read HDF5 files. This grep lists likely call sites; review each one for where the file comes from.

Find PyTables and pandas HDF5 usage in a project directoryShell
grep -rnE "read_hdf|HDFStore|tables\.open_file|open_file\(" --include=*.py .

Pay attention to anything where the file path or content comes from a user upload, a download or a shared location. Trusted, internally generated files carry far lower risk.

What to do now

No fully patched release is available as of the advisory, so mitigation means disabling automatic unpickling wherever untrusted files may be read.

  1. Inventory every service, notebook and job that uses tables or pandas HDF5 functions.
  2. Stop opening .h5 files from untrusted sources until you have applied the opt-out below.
  3. Upgrade to v3.12 or later, which adds the allow_pickle option, and keep an eye on the project for the release that changes the default.
  4. Pass allow_pickle=False when opening untrusted files, or set the global parameter before any file is opened.
  5. For pandas, pass allow_pickle=False to read_hdf or HDFStore as the advisory describes.
  6. Run file-processing workers with least privilege: a dedicated user, no cloud credentials, restricted network access and a read-only filesystem where possible.
  7. Rotate secrets that were reachable by any process that opened an untrusted .h5 file if you suspect it was malicious.

Per the advisory, this opts out for a single file in v3.12 or later:

Disable automatic unpickling for one file (PyTables 3.12 or later)Python
import tables

with tables.open_file("untrusted.h5", allow_pickle=False) as h5file:
    ...  # read data here

To disable it globally for files opened afterwards, set the parameter early in your application startup:

Disable automatic unpickling globally (PyTables 3.12 or later)Python
import tables

tables.parameters.ALLOW_PICKLE = False

The advisory states the same option can be passed through pandas:

Disable unpickling in pandas HDF5 readers (PyTables 3.12 or later)Python
import pandas as pd

df = pd.read_hdf("untrusted.h5", key="data", allow_pickle=False)
store = pd.HDFStore("untrusted.h5", allow_pickle=False)
Caution. Setting allow_pickle=False may break workflows that legitimately store Python objects as attributes, because those attributes will no longer be restored automatically. Test in staging before changing production jobs. On tables 3.11.1 or earlier the option does not exist, so upgrade first or avoid reading untrusted files.
The advisory says the bundled ptdump tool keeps unpickling disabled unless you pass --allow-pickle, so avoid that flag on untrusted files.

Detection and monitoring

Because exploitation happens inside your own Python process, outside scanning will not see it. Look inside your environment instead:

  • Log the origin and hash of every HDF5 file processed by shared or internet-facing services, so you can trace a suspicious file later.
  • Alert on unexpected child processes, outbound connections or file writes from the workers that parse HDF5 data.
  • Add a check to your dependency review process that flags tables versions at or below 3.12 and verifies the opt-out is set. Do not rely on pip-audit alone, since the advisory reports it found nothing on 3.11.1.

If those Python services sit behind a public website, keeping the site itself monitored for unexpected changes helps catch follow-on damage; see Webforta Monitor and our guide on what to do if your website is hacked.

Timeline

Dates as shown in the GitHub advisory
DateEvent
Oct 3, 2026Advisory published in the PyTables repository
Nov 24, 2026Published by the National Vulnerability Database
Nov 30, 2026Published to the GitHub Advisory Database, reviewed and last updated

Further references: the fix commit and the release notes. The advisory compares this to numpy CVE-2019-6446, where numpy changed allow_pickle to default to False.

Sources

This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.

  1. CVE-2026-134019 - GitHub Advisory Databasegithub.com
  • PyTables
  • HDF5
  • pickle
  • deserialization
  • pandas
  • Python