CVE-2026-138118
Received Received - Intake

Insecure Deserialization in HyperSpy Allows Arbitrary Code Execution

Vulnerability report for CVE-2026-138118, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-28

Last updated on: 2026-11-28

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-28
Last Modified
2026-11-28
Generated
2026-11-28
AI Q&A
2026-11-28
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
HyperSpy HyperSpy From 1.4.0 (inc) to 2.6.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-502 The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

HyperSpy versions 1.4.0 to 2.5.0 contain an insecure deserialization vulnerability. Attackers can craft malicious pickle payloads embedded in .hspy or .zspy files, specifically in a component's _class_dump or a 'fn'-flagged _whitelist entry. When a victim restores the model, the payload executes via cloudpickle.loads() (or dill in 1.x), enabling arbitrary Python code execution.

Detection Guidance

Check HyperSpy version with pip show hyperspy. If version is below 2.6.0, the system is vulnerable. Inspect .hspy or .zspy files for suspicious _class_dump or fn-flagged entries using file inspection tools.

Impact Analysis

If exploited, this vulnerability allows attackers to execute arbitrary Python code with the user's privileges. This could lead to data theft, system compromise, or further network infiltration. Users opening untrusted HyperSpy files risk infection.

Compliance Impact

This vulnerability could lead to unauthorized data access or exfiltration, violating GDPR's data protection requirements and HIPAA's safeguards for protected health information. Organizations may face compliance breaches if exploited.

Mitigation Strategies

Upgrade HyperSpy to version 2.6.0 or newer. Avoid using trusted=True with untrusted files. Do not restore models from untrusted sources. Monitor for UnsafeLegacyContent exceptions during model restoration.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-138118. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...