VAITP Dataset

← Back to the dataset

CVE-2026-120859

Arbitrary code execution via crafted HDF5, JSON, dock, or XML files.

  • CVSS 8.5
  • CWE-95
  • Input Validation and Sanitization
  • Local

PyMoDAQ before 4.4.13, and pymodaq_data, pymodaq_gui, and pymodaq_utils before 5.1.15, 5.2.x before 5.2.14, and 5.3.x before 5.3.10, contain deserialization of untrusted data and eval injection vulnerabilities that allow attackers to execute arbitrary code by supplying crafted files that a user opens. Attackers can store pickled objects in HDF5 string nodes that StringARRAY.array_to_string() passes to pickle.loads() when the node is browsed or read, place Python expressions in HDF5 attributes that JsonConverter.json2object() evaluates, supply a .dock file that load_layout_state() unpickles from the Dashboard Load layout action, or embed Python expressions in XML settings files that elt_to_dict() and set_txt_from_elt() evaluate.

CVSS base score
8.5
Published
2026-11-05
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Timing/Serialization
Code defect classification
Serialization Issues
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Local
Impact
Arbitrary Code Execution
Affected component
PyMoDAQ
Fixed by upgrading
Yes

Solution

Upgrade PyMoDAQ to ≥ 4.4.13 and upgrade pymodaq_data, pymodaq_gui, and pymodaq_utils to ≥ 5.1.15 (or to any 5.2.x ≥ 5.2.14, or 5.3.x ≥ 5.3.10).

Vulnerable code sample

import h5py
import pickle

def read_string_array(file_path, dataset_name):
    """Read a StringARRAY stored in an HDF5 file."""
    with h5py.File(file_path, 'r') as f:
        node = f[dataset_name]
        # VULNERABLE: untrusted pickle deserialization
        data = pickle.loads(node[()])
    return data

Patched code sample

import h5py
import json

def read_string_array(file_path, dataset_name):
    """Read a StringARRAY stored in an HDF5 file."""
    with h5py.File(file_path, 'r') as f:
        node = f[dataset_name]
        # FIX: safe JSON deserialization instead of pickle
        data = json.loads(node[()].decode('utf-8'))
    return data

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Read settings xml and compute data mixer formulas without (PyMoDAQ/PyMoDAQ)
    packages/pymodaq/src/pymodaq/extensions/data_mixer/models/equation_model.py, packages/pymodaq/src/pymodaq/extensions/data_mixer/models/equation_model.py · DataMixerModelEquation.compute_formula, packages/pymodaq/src/pymodaq/extensions/data_mixer/parser.py, packages/pymodaq_gui/src/pymodaq_gui/parameter/ioxml.py, packages/pymodaq_gui/src/pymodaq_gui/parameter/ioxml.py · elt_to_dict, packages/pymodaq_gui/src/pymodaq_gui/parameter/ioxml.py · set_txt_from_elt, packages/pymodaq_gui/src/pymodaq_gui/parameter/pymodaq_ptypes/date.py, packages/pymodaq_gui/src/pymodaq_gui/parameter/pymodaq_ptypes/date.py · TimeParameter._interpretValue, packages/pymodaq_utils/src/pymodaq_utils/utils.py, packages/pymodaq_utils/src/pymodaq_utils/utils.py · _literal_value
  • Rebuild stored attribute values without evaluating code (PyMoDAQ/PyMoDAQ)
    packages/pymodaq_utils/src/pymodaq_utils/utils.py, packages/pymodaq_utils/src/pymodaq_utils/utils.py · JsonConverter.json2object
  • Store h5 strings as UTF-8 and read legacy content with a (PyMoDAQ/PyMoDAQ)
    packages/pymodaq_data/src/pymodaq_data/h5modules/backends.py, packages/pymodaq_data/src/pymodaq_data/h5modules/backends.py · StringARRAY.array_to_string, packages/pymodaq_data/src/pymodaq_data/h5modules/backends.py · StringARRAY.string_to_array
  • Save dock layouts as json and read legacy layouts with a (PyMoDAQ/PyMoDAQ)
    packages/pymodaq/src/pymodaq/dashboard.py · DashBoard.save_layout_state, packages/pymodaq_gui/src/pymodaq_gui/utils/layout.py, packages/pymodaq_gui/src/pymodaq_gui/utils/layout.py · load_layout_state, packages/pymodaq_gui/src/pymodaq_gui/utils/layout.py · save_layout_state

Cite this entry

@misc{vaitp:cve2026120859,
  title        = {{Arbitrary code execution via crafted HDF5, JSON, dock, or XML files.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-120859},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-120859/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.