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

- Severity: High 8.5 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.43%, higher than 38% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-11-28T01:43:08.379Z
- Modified: 2026-11-30T17:18:49.530Z
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- HyperSpy HyperSpy: from 1.4.0 before 2.6.0

## Every score

- VulnCheck: CVSS:4.0 8.5 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr> (exploit, vendor-advisory)
- <https://github.com/hyperspy/hyperspy/issues/3699> (exploit, issue-tracking)
- <https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09> (patch)
- <https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d> (patch)
- <https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0> (release-notes)
- <https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146> (technical-description)
- <https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661> (technical-description)
- <https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207> (technical-description)
- <https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-138118](https://www.cve.org/CVERecord?id=CVE-2026-138118), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-138118](https://nvd.nist.gov/vuln/detail/CVE-2026-138118), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-138118 · Whole record: https://cve.day/CVE-2026-138118.json · Rebuilt by cve.day 2026-11-30T17:32:18.914Z
