PyTables HDF5 pickle flaw: no fixed release, and 3.12 stays unsafe by default
PyTables can execute code when reading HDF5 metadata, and upgrading to v3.12 does not fix it unless teams explicitly disable automatic unpickling.
Automated engineering analysis by the Khalid Aboubakr Engineering Desk, from the primary sources listed below. Not reviewed by a person before publication. About the desk
Bottom line
No fixed release of PyTables is available, and the CVE record rates the flaw CVSS 9.8, Critical. v3.12 adds an allow_pickle=False opt-out and a PickleSecurityWarning, but automatic unpickling stays on by default, and a safe default is only expected in v3.13. Any service, pipeline or notebook that opens HDF5 files from outside its trust boundary with PyTables or pandas.read_hdf should move to 3.12 and switch unpickling off explicitly; the upgrade alone is not remediation. Because 3.12.0 requires Python 3.11 and numpy 2.0, environments that cannot meet those minimums have no opt-out and must keep untrusted HDF5 files away from PyTables entirely.
What happened
A PyTables advisory, GHSA-3r7g-mq96-7hhc (CVE-2026-134019), reports that merely opening a malicious .h5 file and reading a metadata attribute can execute attacker-controlled code. PyTables auto-unpickles certain attribute values on read, with no allowlist and no safe unpickler. The CVE record, published with GitHub as CNA, rates the flaw CVSS v3.1 9.8, Critical (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), and classifies it as CWE-502, deserialization of untrusted data.
v3.12 adds an opt-out (allow_pickle=False per file, tables.parameters.ALLOW_PICKLE = False globally), but automatic unpickling remains enabled by default. The advisory says it is expected to be disabled by default only in v3.13. The PyTables 3.12.0 release notes confirm this and list, as a breaking change, that pickle-based (de)serialization of attributes and datasets now raises a PickleSecurityWarning. That is a warning, not a block: the same notes state that automatic unpickling remains enabled by default for compatibility. The same per-file option can be passed through pandas.read_hdf(..., allow_pickle=False) or pandas.HDFStore(..., allow_pickle=False), and ptdump keeps unpickling disabled unless explicitly enabled; per the release notes, so does ptrepack, and pttree never unpickles.
The records disagree on scope. The maintainers' repository advisory on the PyTables repository, GHSA-3r7g-mq96-7hhc, lists tables <= 3.12 as affected, with no patched version. The GitHub Advisory Database entry for the same advisory and the CVE record list <= 3.11.1, also with no patched or fixed version. The Database entry's own description text says <= 3.12, so the entry contradicts itself. NVD states that no fixed version is available as of its review. One OSV record lists a "fix" as commit 8ae7154191676c2ab12ba36450972d0be77efde3 rather than a release, while its own text says no fixed version is available; the other OSV record lists no fixed version. The commit itself is titled as a merge of a GHSA-3r7g-mq96-7hhc fix branch and adds the opt-out text under "Changes from 3.11.1 to 3.12.0" in the release notes: it is the opt-out, not a safe-default fix. The CVE record references the same commit without describing it as a fix or a release, and the evidence does not state that the commit itself is the 3.12.0 release.
The 3.12.0 release notes contain more than the opt-out. They fix two bypasses of it: copy_file(src, dst, allow_pickle=False) previously still read the source with unpickling enabled, and dereferencing an ExternalLink previously opened the linked file with the default policy. They also fix numerous heap-overflow, out-of-bounds and crash issues reachable from crafted HDF5 files, and build wheels against HDF5 2.2.0. The upgrade carries constraints: the minimum Python version is now 3.11 and the minimum numpy version is 2.0, the tables.test function is removed, and print_versions has moved to tables.utils.
The advisory also notes that pip-audit reported no known vulnerabilities on tables 3.11.1 when the issue was reported. It cites numpy CVE-2019-6446 as precedent, where numpy switched np.load to allow_pickle=False by default; that CVE is itself marked disputed, because loading pickled data from trusted sources can be legitimate.
Why it matters
HDF5 is widely treated as a code-free data format. Teams that would never pickle.load a file from a partner, a public dataset or a user upload routinely open .h5 files with PyTables, often indirectly through pandas.read_hdf. The advisory lists data pipelines, ML services, notebooks and pandas as routine paths to the vulnerable code. That is the real exposure: not the library name in a lockfile, but every place an HDF5 file crosses a trust boundary.
Four things make this harder than a normal patch cycle:
- Upgrading is not fixing. On 3.12 the dangerous behaviour is still the default; the new
PickleSecurityWarningreports pickle use but does not stop it. A team that bumps the version and closes the ticket remains exposed. - Scanners may be quiet or inconsistent. Version-range matching differs between records: the maintainers' repository advisory says
<= 3.12, while the GitHub Advisory Database structured data and the CVE record say<= 3.11.1, and the Database entry's own description text says<= 3.12. A scanner keyed on the Database or CVE structured ranges may mark 3.12 as clean even though it unpickles by default. An OSV entry that points at a commit rather than a release gives version-based scanners nothing reliable to match. - Indirect use is common. Many codebases never import
tablesdirectly; they call pandas. - The upgrade has prerequisites. 3.12.0 requires Python 3.11 and numpy 2.0. Data and ML environments pinned to older interpreters or numpy 1.x cannot reach the opt-out without a broader migration.
What is overstated: the risk is conditional. A process that only reads HDF5 files it wrote itself, from storage only it can write to, is not meaningfully exposed. The 9.8 rating assumes network delivery with no privileges or user interaction, which fits automated ingestion of external files; it overstates the practical risk for systems that only round-trip their own data. The severity is concentrated where external files are ingested.
Engineering assessment
Our assessment: this is a high-priority issue for any system that ingests HDF5 from outside its own control, and a low one for systems that only round-trip their own files. The flaw is the same class as the numpy np.load case: deserialisation of untrusted data presented as a data-format read. The trigger is attribute access, which is ordinary metadata handling, so "we only read the data, not the objects" is not a defence.
The maintainers have chosen compatibility over safety for one more release. That is a defensible choice for a library whose users may have stored Python objects in attributes on purpose, but it shifts the burden onto every consumer. Engineering teams should not wait for v3.13: the opt-out exists in 3.12, and the safe posture is to make allow_pickle=False the explicit default in your own code now.
The trade-off is real. Files that legitimately store pickled Python objects as attributes will stop round-tripping those values once unpickling is disabled. The evidence does not describe exactly what PyTables returns for such attributes when pickling is off, and it does not say how common pickled attributes are; testing on representative files is what establishes the impact before a global rollout. Teams that do rely on pickled attributes should treat that as technical debt to retire, since v3.13 is expected to change the default anyway.
The global switch, tables.parameters.ALLOW_PICKLE = False, applies to newly opened files, so it must be set early in process start-up, before any HDF5 file is opened. The per-file option is more precise but easier to miss in one code path. For services, set the global switch at start-up and pass allow_pickle=False explicitly at untrusted-input call sites as a second line.
Two cautions. First, the evidence does not confirm that the opt-out covers every code path that reaches pickle.loads; the advisory names attribute access via __getattr__ and __getitem__, and the opt-out is described generally. The caution is well founded: the 3.12.0 release notes themselves fix two bypasses of the opt-out, in copy_file and in ExternalLink dereferencing, so its coverage has already needed patching once. Second, the evidence does not say which pandas versions forward allow_pickle to PyTables. Verify both in your installed versions rather than assuming.
Separately from the pickle issue, 3.12.0 fixes a long list of memory-safety flaws reachable from crafted HDF5 files and ships wheels built against a newer HDF5. For anything that reads external HDF5, that strengthens the case for upgrading where the Python 3.11 and numpy 2.0 minimums can be met. Where they cannot, there is no opt-out to switch on, and the defensible options are to stop opening untrusted files with PyTables or pandas.read_hdf, or to confine those reads to isolated workers.
Is this you?
tables(PyTables) is installed in any environment, directly or alongside pandas for HDF5 support (pandas.read_hdfbuilds on PyTables) — check withpip show tablesorpip list.- Your code calls
pandas.read_hdf,pandas.HDFStoreortables.open_file. - Any of those calls can receive a file you did not produce: uploads, partner feeds, public datasets, shared buckets, model or feature artefacts from other teams.
- You run notebooks where analysts open
.h5files downloaded from external sources. - You are on 3.12 but have not set
allow_pickle=FalseorALLOW_PICKLE = False— you are still exposed, whether or notPickleSecurityWarningappears in your logs. - You run on Python older than 3.11 or numpy older than 2.0 — you cannot install 3.12.0 and have no opt-out available.
- Your dependency scanner reports
tablesas clean — this does not settle the question, given the conflicting ranges.
What to do
- Inventory today. Find every environment with
tables(pip show tables,pip list) and every call site ofread_hdf,HDFStoreandopen_file. Classify each by whether its input can be attacker-influenced. - Move to 3.12 to gain the opt-out (
pip install --upgrade tables, then confirm withpip show tables). Earlier versions have no opt-out at all. Check the prerequisites first: 3.12.0 requires Python 3.11 and numpy 2.0 (python --version,pip show numpy), removestables.testand movesprint_versionstotables.utils. Environments pinned below those minimums cannot get the opt-out; for them, see step 7 and do not open untrusted files with PyTables orpandas.read_hdfat all. - Disable unpickling explicitly. Set
tables.parameters.ALLOW_PICKLE = Falseat process start-up, before any file is opened, and passallow_pickle=Falsetotables.open_file,pandas.read_hdforpandas.HDFStoreat untrusted-input call sites (vendor-documented workaround). - Verify pandas forwards the option in your installed pandas version; if it does not, call PyTables directly for untrusted files or keep the global switch in place.
- Test on representative files to find any workflow that depends on pickled attributes, and plan to remove that dependency before v3.13. On 3.12, the
PickleSecurityWarningthe release notes describe can help locate such workflows; the evidence does not detail whether it fires on every read path. - Use
ptdumpfor inspection of unknown files; it keeps unpickling off unless explicitly enabled. - Not vendor guidance: open externally sourced HDF5 files only in isolated, low-privilege workers without credentials or network access to internal systems, and consider converting inbound data to formats that do not carry Python objects. For environments that cannot upgrade, this isolation, or not reading untrusted HDF5 with PyTables at all, is the only available protection.
- Not vendor guidance: do not close this finding on a scanner result alone; record the explicit configuration change as the remediation.
What we don't know yet
- Whether the registries will align on 3.12 being affected: the maintainers' repository advisory lists
<= 3.12, but the GitHub Advisory Database structured data and the CVE record list<= 3.11.1, and the Database entry's description text says<= 3.12. - Whether commit
8ae7154shipped unchanged in the 3.12.0 release. The commit is titled as a merge of a GHSA-3r7g-mq96-7hhc fix branch and adds the opt-out to the 3.12.0 release notes; it is the opt-out, not a safe-default fix, and the evidence does not state that the commit itself is the 3.12.0 release. - When v3.13, with the safe default, will ship.
- Whether the opt-out covers every path that reaches
pickle.loads, beyond thecopy_fileandExternalLinkbypasses already fixed in 3.12.0. - Whether
PickleSecurityWarningis raised on every read path that unpickles. - Which pandas versions pass
allow_picklethrough, and whether everyread_hdfandHDFStorepath is covered. - Whether there is any real-world attack activity. The evidence contains no report of exploitation in the wild. CISA's ADP enrichment of the CVE record rates exploitation status as 'poc' (a public proof of concept exists, published in the advisory) and the flaw as automatable; EPSS is 1.242%.
The desk will revisit when registry records are reconciled or v3.13 is released.
Sources
Updates
- : Updated: the CVE record now rates the flaw CVSS v3.1 9.8 (Critical) and lists PyTables <= 3.11.1 as affected with no fixed version, and the PyTables 3.12.0 release notes confirm a new PickleSecurityWarning, fixes for two opt-out bypasses, memory-safety fixes and new minimums of Python 3.11 and numpy 2.0. The article also now reflects that CISA's ADP enrichment rates exploitation status as 'poc' and the flaw as automatable, rather than stating that only an EPSS estimate was available.
Corrections
- : Added the maintainers' repository advisory (GHSA-3r7g-mq96-7hhc on the PyTables repository), which lists tables <= 3.12 with no patched version; the GitHub Advisory Database entry and the CVE record list <= 3.11.1, and the Database entry's own description text says <= 3.12. Also clarified that commit 8ae7154 is the merge of the advisory's fix branch adding the 3.12.0 opt-out, not a safe-default fix.
Latest engineering analysis
6 min read
websocket-driver CVE-2026-140003: one request crashes Node, fix changes defaults
A pre-RFC handshake parser in websocket-driver lets one unauthenticated request kill a Node.js process; 0.8.0 fixes it but switches legacy draft support off by default.
5 min read
AWS HealthOmics MCP Server: linted workflow bundles could run code
A search-path flaw in the HealthOmics MCP Server's workflow linting tools means a bundle under inspection may supply code that runs as the server's user, so bundle provenance matters as much as version.
1 min read
NukeViet CVE-2026-94597: upload RCE hinges on Apache mod_php config
A four-step upload bypass in NukeViet becomes remote code execution only on Apache mod_php with short tags enabled, and conflicting registry data on the 4.6 fix may mislead scanners.