{"affected":[{"defaultStatus":"unaffected","ecosystem":"pypi","packageName":"hyperspy","product":"HyperSpy","source":"CNA: VulnCheck","vendor":"HyperSpy","versions":[{"lessThan":"2.6.0","status":"affected","version":"1.4.0","versionType":"semver"}]}],"cveId":"CVE-2026-138118","cwes":["CWE-502"],"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.","epss":null,"exploits":[],"kev":null,"metrics":[{"score":8.5,"severity":"high","source":"CNA: VulnCheck","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,"severity":"high","source":"CNA: VulnCheck","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"}],"modifiedAt":1795830188379,"publishedAt":1795830188379,"references":[{"source":"CNA: VulnCheck","tags":["vendor-advisory"],"url":"https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr"},{"source":"CNA: VulnCheck","tags":["patch"],"url":"https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09"},{"source":"CNA: VulnCheck","tags":["patch"],"url":"https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d"},{"source":"CNA: VulnCheck","tags":["release-notes"],"url":"https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0"},{"source":"CNA: VulnCheck","tags":["issue-tracking"],"url":"https://github.com/hyperspy/hyperspy/issues/3699"},{"source":"CNA: VulnCheck","tags":["technical-description"],"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146"},{"source":"CNA: VulnCheck","tags":["technical-description"],"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661"},{"source":"CNA: VulnCheck","tags":["technical-description"],"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207"},{"source":"CNA: VulnCheck","tags":["third-party-advisory"],"url":"https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration"}],"remediation":[{"kind":"fix","source":"CNA: VulnCheck","text":"The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.","url":"https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09"},{"kind":"fix","source":"CNA: VulnCheck","text":"The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.","url":"https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d"}],"revision":"76f9eede6285b5d1fe9718b44cb368efeac4509aaccf15e9ec87e1faa3445f45","sources":[{"modifiedAt":1795830188379,"name":"CNA: VulnCheck","retrievedAt":1795831703121,"url":"https://www.cve.org/CVERecord?id=CVE-2026-138118"}],"ssvc":null,"status":"published","title":"HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration","updatedAt":1795831703121}