CVE-2026-138118: HyperSpy from Deserialization of Untrusted Data
Published 2026-11-28 · Updated 2026-12-04 · Source disclosure@vulncheck.com
Not known to be exploited · high severity — update HyperSpy from to 2.6.0 or later in your next patch cycle.
What to do
- Update HyperSpy from to version 2.6.0 or later. Versions from 1.4.0 up to, but not including, 2.6.0 are affected.
- Until it is patched, limit who has a local account on systems running HyperSpy from.
- Block untrusted serialized input to the affected endpoint at the proxy or WAF.
- Exploitation needs a victim to act, so warn users of the affected system about unexpected links and files.
Affected and fixed versions
| Product | Affected | Fixed in |
|---|---|---|
| HyperSpy from | ≥ 1.4.0, < 2.6.0 | 2.6.0 |
Derived by HackerFeeds from the advisory text, CVSS vector and weakness class. Confirm versions against the vendor advisory before acting.
How it can be exploited
Exploiting it requires local access to the system, or getting a user to open a crafted file; the attacker does not need an account, and a victim has to take an action such as opening a link or file. Attack complexity is low, so a working exploit is expected to be reliable. The impact on confidentiality, integrity and availability is rated high.
| Attack vector | Local | Exploiting it requires local access to the system, or getting a user to open a crafted file. |
|---|---|---|
| Attack complexity | Low | No special conditions are needed; the attack is repeatable. |
| Privileges required | None | The attacker does not need an account. |
| User interaction | Required | A victim has to take an action, such as opening a link or file. |
| Confidentiality | High | Total loss of confidentiality. |
| Integrity | High | Total loss of integrity. |
| Availability | High | Total loss of availability. |
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness: Deserialization of Untrusted Data
The application rebuilds objects from attacker-supplied data, which frequently leads to arbitrary code execution.
Classified as 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.
Advisory text as published in the NVD record.
References
- Patchhttps://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d
- Patchhttps://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09
- Patchhttps://github.com/hyperspy/hyperspy/releases/tag/v2.6.0
- Advisoryhttps://github.com/hyperspy/hyperspy/security/advisories/GHSA-j975-x368-3hrr
- Referencehttps://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207
- Referencehttps://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146
- Referencehttps://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661
- Referencehttps://github.com/hyperspy/hyperspy/issues/3699