Insecure Deserialization in HyperSpy Allows Code Execution
CVE-2026-138118
8.5HIGH
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
