CVE-2026-138118
7.8HighPublished Nov 28, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite
High
0CVSS v3.110
- Attack vector
- Local
- Complexity
- Low
- Privileges
- None
- User action
- Required
- Impact
- Full C/I/A compromise
- Weakness
- CWE-502
What an attacker gets
Attackers can execute arbitrary Python code by providing a malicious .hspy or .zspy file. A user must open or restore a crafted model file for the exploit to trigger.
Root cause
The application uses insecure deserialization via cloudpickle or dill when loading stored model data.
Affected versions
HyperSpy 1.4.0 through 2.5.x
CVSS v3.1 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Fix & remediation
Upgrade to HyperSpy 2.6.0 or later. Do not open model files from untrusted sources until the package is updated.
$ pip install --upgrade hyperspyAI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD 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.
References
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661
- https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d
- https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09
- https://github.com/hyperspy/hyperspy/issues/3699
- https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0
- https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr
- https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration
Related Critical / High CVEs
More fully triaged vulnerabilities you may want to check next.
- CVE-2026-1381627.0HighAttackers can execute arbitrary code or crash the application by providing a crafted backup file. This requires a user to perform a restore or addnew operation on an attached Alcatel phone.
- CVE-2026-1381617.8HighAttackers can achieve code execution by providing a crafted backup file with an overlong MD5 value. This requires a user to process a malicious file using convertbackup or restore.
- CVE-2026-1381607.8HighAttackers can execute arbitrary code or crash the application by providing a malicious backup file. This requires a user to trigger a restore or backup process with a crafted file.
- CVE-2026-1381198.8HighUnauthenticated attackers can steal session cookies and take over Kestra instances by tricking a logged-in user into clicking a malicious link. This is a reflected cross-site scripting attack that executes arbitrary JavaScript in the user's browser.
- CVE-2026-13800410.0CriticalRemote unauthenticated attackers can execute arbitrary OS commands with root privileges. This is achieved by sending a crafted request to the UPnP Igd Control Endpoint.
- CVE-2026-1380039.0CriticalRemote attackers can execute arbitrary code via a stack-based buffer overflow. This requires sending a crafted SOAPAction request to the UPnP interface.