CVE-2026-138118: HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration

Published Nov 28, 2026
·
Updated

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 classdump or a 'fn'-flagged whitelist entry, which cloudpickle.loads() (dill in 1.x) runs when the victim restores the model.

Affected Software

1 affected component
HyperSpy HyperSpy>=1.4.0<2.6.0

Event History

Nov 28, 2026
CVE Published
via MITRE·01:43 AM
Data Sourced
via MITRE·01:43 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue, and what must the victim do?

An attacker must provide a crafted .hspy or .zspy file containing malicious stored-model data. Exploitation occurs when a victim restores the model; the attacker does not need prior privileges in the victim's HyperSpy environment.

2

Which installations are known to be affected?

HyperSpy versions from 1.4.0 up to, but not including, 2.6.0 are affected. The provided information does not establish whether versions earlier than 1.4.0 are affected.

3

What can be done before updating?

Do not restore models from untrusted or unverifiable .hspy or .zspy files. Treat stored-model data as potentially executable because restoration can deserialize malicious payloads through component _class_dump data or fn-flagged _whitelist entries.

4

How can I determine whether a file may trigger the issue?

A potentially malicious file contains crafted serialized data in a component's _class_dump field or in a _whitelist entry marked with the fn flag. The payload executes during model restoration, rather than merely from the file being present.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203