CVE-2026-138118

HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration

Published Nov 28, 2026 CVSS 4.0 · 8.5 High EPSS n/a KEV · Not listed
Description
HyperSpy from 1.4.0 before 2.6.0 contains an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by supplying crafted stored-model data in .hspy or .zspy files. Attackers can embed a malicious pickle payload in a component's _class_dump or a 'fn'-flagged _whitelist entry, which cloudpickle.loads() (dill in 1.x) runs when the victim restores the model.

Analysis

AI-generated

Technical impact

HyperSpy versions 1.4.0 up to but not including 2.6.0 can be tricked into executing arbitrary Python code when a malicious .hspy or .zspy file is restored. The flaw is due to the use of cloudpickle (or dill in earlier releases) to deserialize model data without validating the payload, allowing an attacker to craft a pickle that runs code during restoration. This flaw can compromise the confidentiality, integrity, and availability of the host system if an untrusted file is opened.

Affected Systems

Vendor HyperSpy: HyperSpy is impacted by this issue. All releases from 1.4.0 up to but not including 2.6.0 are affected. Users running any of these versions on Windows, Linux, or macOS are vulnerable.

Risk and Exploitability

The CVSS score is 8.5, indicating a high severity of potential damage. EPSS data is not available, but the vulnerability has not yet appeared in the CISA KEV list. The likely attack vector is local file injection: an attacker supplies a crafted .hspy or .zspy file, and when a user opens it in HyperSpy, the unsafe deserialization routine executes malicious code. No public exploit has been documented, yet the severity rating suggests the potential for widespread compromise if the flaw were exploited by a skilled adversary.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade HyperSpy to version 2.6.0 or later, where the insecure deserialization problem has been fixed.
  • If an upgrade is not immediately feasible, remove or quarantine all .hspy and .zspy files that originate from untrusted sources and disable automatic model restoration while processing unknown file formats.
  • Run HyperSpy under a restricted user account with limited system privileges to reduce the impact should a malicious file be unintentionally restored.

Generated by OpenCVE AI on November 28, 2026 at 02:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description HyperSpy from 1.4.0 before 2.6.0 contains an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by supplying crafted stored-model data in .hspy or .zspy files. Attackers can embed a malicious pickle payload in a component's _class_dump or a 'fn'-flagged _whitelist entry, which cloudpickle.loads() (dill in 1.x) runs when the victim restores the model.
Title HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration
Weaknesses CWE-502
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Subscriptions

No data.

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 28, 2026, 1:43 AM
Reserved
Nov 27, 2026, 11:50 PM
Status
Received
Published
Nov 28, 2026, 2:17 AM
Modified
Nov 28, 2026, 2:17 AM