Vulnerability 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 Score
HIGH
Related Weaknesses (CWE)
References
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary
- 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/28fdf2d0320c76c5d57a57e323ac510b2005
- https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dc
- 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-deseri
FAQ
What is CVE-2026-138118?
CVE-2026-138118 is a vulnerability with a CVSS score of 7.8 (HIGH). 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 file...
How severe is CVE-2026-138118?
CVE-2026-138118 has been rated HIGH with a CVSS base score of 7.8/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-138118?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.