{"id":"CVE-2026-138118","aliases":[],"kind":"cve","tier":"hot","status":"published","title":"HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration","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.","ai_summary":{"text":"An attacker who supplies a crafted .hspy or .zspy model file can execute arbitrary Python code in HyperSpy when a victim restores the stored model.","model":"claude-haiku-5-5","label":"AI summary"},"severity":"high","cvss":{"score":8.5,"version":"4.0","vector":"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","source":"CNA"},"scores":[{"score":8.5,"source":"cna","vector":"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","version":"4.0"},{"score":7.8,"source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},{"score":8.5,"source":"cna","vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","version":"4.0"}],"cwe":["CWE-502"],"remote":false,"remote_unauth":false,"epss":null,"kev":{"listed":false,"added":null,"due":null,"ransomware":null},"exploit":{"public":false,"exploitdb_ids":[]},"affected":[],"affected_products":[{"source":"cvelist","vendor":"HyperSpy","product":"HyperSpy","versions":">= 1.4.0, < 2.6.0"}],"ai_versions":{"affected":[{"text":"HyperSpy from 1.4.0 before 2.6.0","quote":"HyperSpy from 1.4.0 before 2.6.0","product":"hyperspy"}],"fixed":[{"quote":"before 2.6.0","product":"hyperspy","version":"2.6.0"}],"model":"claude-haiku-5-5","label":"AI-extracted versions"},"mitigation":"Upgrade HyperSpy to 2.6.0 or later.","technologies":[{"slug":"pypi","name":"PyPI packages","method":"ai"},{"slug":"python","name":"Python","method":"ai"}],"references":[{"url":"https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr","kind":"vendor"},{"url":"https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09","kind":"patch"},{"url":"https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d","kind":"patch"},{"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146","kind":"article"},{"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661","kind":"article"},{"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207","kind":"article"},{"url":"https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0","kind":"other"},{"url":"https://github.com/hyperspy/hyperspy/issues/3699","kind":"other"},{"url":"https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration","kind":"other"}],"workarounds":null,"vendors":["hyperspy"],"products":["hyperspy"],"cpes":[],"published_at":"2026-11-28T01:43:08.379Z","modified_at":"2026-11-28T02:17:33.327Z","promoted_at":null,"attribution":[{"source":"CVE Program","text":"CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation.","url":"https://www.cve.org/Legal/TermsOfUse"},{"source":"NVD","text":"This product uses data from the NVD API but is not endorsed or certified by the NVD.","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138118"}],"links":{"html":"https://flawdb.com/CVE-2026-138118","markdown":"https://flawdb.com/CVE-2026-138118.md","json":"https://flawdb.com/api/v1/entries/CVE-2026-138118"}}