---
title: "CVE-2026-138118: HyperSpy - Remote Code Execution"
description: "HyperSpy > 1.4.0 < 2.6.0 contains an insecure deserialization vulnerability caused by malicious pickle payloads in stored-model data files, letting attackers execute arbitrary Python code remotely, exploit requires victim to restore the model."
url: https://panop.io/threat-heartbeat/CVE-2026-138118/
---

# CVE-2026-138118 HyperSpy - Remote Code Execution

HyperSpy > 1.4.0 < 2.6.0 contains an insecure deserialization vulnerability caused by malicious pickle payloads in stored-model data files, letting attackers execute arbitrary Python code remotely, exploit requires victim to restore the model.

CVSS base score 7.8 /10

High

CISA KEV

Not listed

Public exploit

None known

Authentication

Not required

EPSS

0.22% chance of exploitation in 30 days

[View the NVD record ↗](https://nvd.nist.gov/vuln/detail/CVE-2026-138118)

## Details

Type

Remote Code Execution

Impact

Remote Code Execution

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Published

28 November 2026

Updated

29 November 2026

Weakness

[CWE-502](https://cwe.mitre.org/data/definitions/502.html)

## Vendor fix

Update to version 2.6.0 or later.

Patching closes this CVE. It does not tell you which of your systems run the affected version, or what else is exposed alongside them.

## References

- [https://nvd.nist.gov/vuln/detail/CVE-2026-138118](https://nvd.nist.gov/vuln/detail/CVE-2026-138118)
- [https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09](https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09)
- [https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0](https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0)
- [https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export\_dictionary.py#L187-L207](https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207)
- [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#L106-L146)
- [https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d](https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d)
- [https://github.com/hyperspy/hyperspy/issues/3699](https://github.com/hyperspy/hyperspy/issues/3699)
- [https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr](https://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr)
- [https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration](https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration)
- [https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661](https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661)

[← All CVEs](https://panop.io/threat-heartbeat/)

## What this record can't tell you

- Whether you run the affected software, and where
- Whether an attacker can actually reach and exploit it
- The misconfigurations that never get a CVE number
- What it would cost the business, ranked into what to fix first

Panop answers these inside your environment, for this CVE and every other finding.

[Book a demo](https://panop.io/demo)
