/

CVE-2026-134019

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization (CWE-502) in PyTables Attributes

CVE-2026-134019

Awaiting Analysis

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

PyTables can interpret certain NumPy byte-string attributes in an HDF5 file as pickled Python objects and deserialize them when the attributes are accessed. Reading a crafted file's affected metadata may execute attacker-controlled code in the process consuming the file.

Affected context

The issue occurs in PyTables attribute handling when an attribute is accessed through AttributeSet.__getattr__ or AttributeSet.__getitem__. In versions 3.11.1 and earlier, a NumPy bytes scalar ending in a period can be treated as a pickled object and passed to pickle.loads(). Risk arises when an application opens an attacker-controlled HDF5 file and reads an affected metadata attribute.

Exploit preconditions

  • Attack surface: Processing an HDF5 file with PyTables.
  • Required access: An attacker must be able to provide or influence the file being processed; direct access to the consumer's system is not necessarily required.
  • Trigger point: Accessing an affected metadata attribute through AttributeSet.__getattr__ or AttributeSet.__getitem__.
  • Why exploitation is possible: The attribute handling logic may pass attacker-controlled data to Python's pickle deserializer.

Why this happens

PyTables uses the content and shape of a NumPy bytes scalar to identify values as pickled objects, then calls pickle.loads() during attribute access. Pickle deserialization can invoke object construction behavior, so applying it to untrusted file metadata can execute attacker-controlled code. This is CWE-502: Deserialization of Untrusted Data.

Potential impact

  • Attacker-controlled code may execute in the process reading the HDF5 file.
  • The process's accessible data or credentials could be exposed or modified.
  • The host or service running the consumer could be compromised, subject to its permissions.
  • Further systems or data accessible to the consumer could be affected.

General mitigation guidance

Defensive approaches focus on avoiding executable deserialization of file metadata and reducing trust in externally supplied data.

  • Prefer non-executable, explicitly typed serialization formats for metadata.
  • Treat HDF5 files and their attributes as untrusted, even when they come from routine data workflows.
  • Validate attribute types and schemas without invoking pickle or other executable deserializers.
  • Where legacy formats must be handled, isolate file processing and limit the process's filesystem, network, and credential access.
  • Apply least-privilege permissions and avoid granting file-processing workers access beyond what their task requires.

How teams detect issues like this

  • Use static analysis to identify pickle.loads() and other executable deserialization calls reachable from file or metadata parsing.
  • Review attribute access paths for format heuristics that dispatch input to deserializers.
  • Add tests and security checks that exercise malformed or externally supplied HDF5 metadata without executing it.
  • Enforce code-review or CI policies that prohibit unsafe deserialization of untrusted data; automated review tools may help flag relevant patterns.

Sources

SourceLink
github.comgithub.com/PyTables/PyTables/blob/967fb5120dffd7768bf7f3fec14b04f169335ec5/RELEASE_NOTES.rst#L156-L178
github.comgithub.com/PyTables/PyTables/commit/8ae7154191676c2ab12ba36450972d0be77efde3
github.comgithub.com/PyTables/PyTables/security/advisories/GHSA-3r7g-mq96-7hhc

Frequently asked

questions

The issue is triggered while processing a file, rather than through a network endpoint by itself. It may be reachable remotely if an application accepts or retrieves attacker-controlled HDF5 files and reads affected attributes.

An attacker needs a way to influence the HDF5 file that a PyTables consumer opens. The vulnerable attribute must then be accessed by the application.

Avoid using pickle to deserialize metadata from files that may be untrusted. Use a non-executable format with explicit type and schema validation instead.

Treat imported data files as untrusted, review deserialization paths, test metadata handling with adversarial inputs, and isolate file-processing components with least privilege.

Find out what's already
exploitable in your codebase.