Insecure Deserialization in HyperSpy Allows Code Execution
CVE-2026-138118

8.5HIGH

Key Information:

Vendor

Hyperspy

Status
Vendor
CVE Published:
28 November 2026

What is CVE-2026-138118?

The HyperSpy library, versions 1.4.0 up to 2.5.0, is susceptible to an insecure deserialization issue that can allow attackers to execute arbitrary Python code. This occurs when crafted model data is restored from .hspy or .zspy files. By embedding malicious pickle payloads within specific model components, an attacker can manipulate the restoration process, executing unintended commands on the victim's system. The issue arises from the library’s reliance on cloudpickle.loads() to deserialize untrusted data, highlighting the need for secure handling of serialized objects.

Affected Version(s)

HyperSpy 1.4.0 < 2.6.0

References

CVSS V4

Score:
8.5
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Dilanka Kaushal Hewage
hnwg
.