PatchSiren cyber security CVE debrief
CVE-2026-138118 HyperSpy CVE debrief
HyperSpy versions 1.4.0 before 2.6.0 contain an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by supplying crafted stored-model data in .hspy or .zspy files. The vulnerability is due to the insecure use of cloudpickle.loads() (or dill in 1.x) when restoring models, which can be exploited by embedding a malicious pickle payload in a component's _class_dump or a 'fn'-flagged _whitelist entry.
- Vendor
- HyperSpy
- Product
- Unknown
- CVSS
- HIGH 8.5
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-11-28
- Original CVE updated
- 2026-11-28
- Advisory published
- 2026-11-28
- Advisory updated
- 2026-11-28
Who should care
Defenders responsible for systems or applications using HyperSpy versions 1.4.0 before 2.6.0 should assess exposure and prioritize patching or mitigation, especially in environments where untrusted models are restored.
Why it matters
CVE-2026-138118 is a high-severity vulnerability in HyperSpy that allows for arbitrary Python code execution through insecure deserialization. Defenders should prioritize patching or mitigating this vulnerability, especially in environments where untrusted models are restored.
- Arbitrary Python code execution
- Potential for lateral movement
- Data tampering or theft through model manipulation
- Disruption of critical systems or services
Technical summary
The HyperSpy library is vulnerable to insecure deserialization when restoring models from .hspy or .zspy files. An attacker can exploit this by crafting a malicious pickle payload and embedding it in a component's _class_dump or a 'fn'-flagged _whitelist entry, allowing for arbitrary Python code execution. This vulnerability affects HyperSpy versions 1.4.0 before 2.6.0 and can be mitigated by patching to version 2.6.0 or later. Defenders should prioritize patching or mitigating this vulnerability, especially in environments where untrusted models are restored.
Defensive priority
Defenders should prioritize patching or mitigating this vulnerability, especially in environments where untrusted models are restored.
Recommended defensive actions
- Patch HyperSpy to version 2.6.0 or later
- Restrict model restoration to trusted sources
- Monitor for suspicious model restoration activity
- Review compensating controls for exposed systems
- Check relevant monitoring, detection, and logs for exposed assets
- Track exceptions and retest remediated assets
- Confirm whether affected product deployments exist in managed environments
Evidence notes
The CVE record and source item provide details on the vulnerability, including its description, affected versions, and references to vendor advisories and patches. Defenders should verify HyperSpy versions, review model restoration processes, and assess exposure in their environments. The vulnerability allows for arbitrary Python code execution through insecure deserialization when restoring models from .hspy or .zspy files. Evidence is limited to public CVE details and vendor advisories.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-138118 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-138118
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-138118 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-138118
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
HyperSpy 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration
Unverified legacy reference
URL: https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/138xxx/CVE-2026-138118.json
cve_program_cvelist_v5
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr
Supplemental source - vendor-advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09
Supplemental source - patch
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d
Supplemental source - patch
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0
Supplemental source - release-notes
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/issues/3699
Supplemental source - issue-tracking
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py
Supplemental source - technical-description
-
Source reference
Unverified legacy reference
URL: https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py
Supplemental source - technical-description
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.