{"id":"CVE-2026-138118","state":"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.","publishedAt":"2026-11-28T01:43:08.379Z","updatedAt":"2026-11-28T01:43:08.379Z","severity":{"score":8.5,"label":"High","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":"VulnCheck"},"assigner":"VulnCheck","products":["HyperSpy HyperSpy"],"affected":[{"vendor":"HyperSpy","product":"HyperSpy","packageURL":"pkg:pypi/hyperspy","defaultStatus":"unaffected","versions":[{"version":"1.4.0","status":"affected","lessThan":"2.6.0","versionType":"semver"}],"repo":"https://github.com/hyperspy/hyperspy"}],"references":["https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr","https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09","https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d","https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0","https://github.com/hyperspy/hyperspy/issues/3699","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/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207","https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration"],"weaknesses":["CWE-502"],"ingestedAt":"2026-11-28T01:48:06.029Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/138xxx/CVE-2026-138118.json","commit":"bafc8c82504acb338f60e61d73af6875ff7797ce","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-138118","state":"PUBLISHED","datePublished":"2026-11-28T01:43:08.379Z","dateUpdated":"2026-11-28T01:43:08.379Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-11-27T23:50:31.898Z"},"containers":{"cna":{"title":"HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"HyperSpy","product":"HyperSpy","packageURL":"pkg:pypi/hyperspy","defaultStatus":"unaffected","versions":[{"version":"1.4.0","status":"affected","lessThan":"2.6.0","versionType":"semver"}],"repo":"https://github.com/hyperspy/hyperspy"}],"references":[{"url":"https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr","tags":["vendor-advisory"],"name":"GitHub Security Advisory (GHSA-j975-x368-3hrr)"},{"url":"https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09","tags":["patch"],"name":"Merge of PR #3704 (require trust for pickled model content)"},{"url":"https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d","tags":["patch"],"name":"Require explicit trust to restore pickled model components"},{"url":"https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0","tags":["release-notes"],"name":"HyperSpy v2.6.0 Release Notes"},{"url":"https://github.com/hyperspy/hyperspy/issues/3699","tags":["issue-tracking"],"name":"GitHub issue #3699"},{"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146","tags":["technical-description"],"name":"reconstruct_component in model.py (v2.5.0)"},{"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661","tags":["technical-description"],"name":"Model._load_dictionary in model.py (v2.5.0)"},{"url":"https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207","tags":["technical-description"],"name":"reconstruct_object in export_dictionary.py (v2.5.0)"},{"url":"https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration","name":"VulnCheck Advisory: HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"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","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":8.5,"baseSeverity":"HIGH"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":7.8,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-502","lang":"en","description":"Deserialization of Untrusted Data","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-11-28T01:43:08.379Z"},"datePublic":"2026-11-27T00:00:00.000Z","credits":[{"lang":"en","value":"Dilanka Kaushal Hewage","type":"finder"},{"lang":"en","value":"hnwg","type":"finder"}],"x_generator":{"engine":"vulncheck-endgame"}}}}}