# CVE-2026-138117

Code execution via malicious .hspy/.zspy files in HyperSpy <2.6.0

- Page: https://www.vulneraibility.com/cve/CVE-2026-138117
- CVSS: 8.5
- Known exploited: not in CISA KEV as of our last sync
- EPSS: 0.25% (percentile 9.9)
- Weakness: CWE-95
- Also known as: GHSA-632c-gw75-99r3
- EUVD: EUVD-2026-137534 (https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-137534)
- Published: 2026-11-28

## Affected versions

- HyperSpy: affected >= 1.2.0 and < 2.6.0

A version outside these ranges is not a statement that it is unaffected.

## Impact

Arbitrary Python code execution when a user loads crafted .hspy/.zspy files (hs.load() or model restore), enabling code execution under the user's account.

## Action

Immediate action required

## Recommendation

Upgrade HyperSpy to >=2.6.0 and avoid loading untrusted .hspy/.zspy files.

## References

- [advisory] https://github.com/hyperspy/hyperspy/security/advisories/GHSA-632c-gw75-99r3
- [patch] https://github.com/hyperspy/hyperspy/commit/fe484c936b9a1d425813e145298f9eeb1d83abf6
- [patch] https://github.com/hyperspy/hyperspy/commit/973c9f9ce5937a022afe718f4f63c410eb96539e
- [other] https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0
- [other] https://github.com/hyperspy/hyperspy/issues/3699
- [other] https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/axes.py#L1031-L1071
- [other] https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/_components/expression.py#L58-L66
- [other] https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/component.py#L205-L217
- [advisory] https://www.vulncheck.com/advisories/hyperspy-before-2.6.0-code-execution-via-sympy-sympify-in-hspy-zspy-files
- [EUVD (ENISA)] https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-137534

---
Summary, impact and action are written by the vulneraibility.com AI analysis pipeline from the CVE record, NVD, CISA and FIRST data; verify against the references.
