# CVE-2026-138117: HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files

- Severity: High 8.5 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2026-11-28T01:43:09.488Z
- Modified: 2026-11-28T02:17:33.150Z
- Weaknesses: CWE-95
- Assigned by: VulnCheck

## Description

HyperSpy from 1.2.0 before 2.6.0 contains a code execution vulnerability that allows attackers to run Python code by embedding malicious expression strings evaluated with sympy.sympify(). Attackers can craft .hspy or .zspy files with malicious axis, Expression component, or twin function expressions that execute when victims call hs.load() or restore models.

(As written by CVE List.)

## Affected

- HyperSpy HyperSpy: from 1.2.0 before 2.6.0

## Every score

- VulnCheck: CVSS:4.0 8.5 High `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`
- VulnCheck: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/hyperspy/hyperspy/security/advisories/GHSA-632c-gw75-99r3> (vendor-advisory)
- <https://github.com/hyperspy/hyperspy/commit/fe484c936b9a1d425813e145298f9eeb1d83abf6> (patch)
- <https://github.com/hyperspy/hyperspy/commit/973c9f9ce5937a022afe718f4f63c410eb96539e> (patch)
- <https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0> (release-notes)
- <https://github.com/hyperspy/hyperspy/issues/3699> (issue-tracking)
- <https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/axes.py#L1031-L1071> (technical-description)
- <https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/_components/expression.py#L58-L66> (technical-description)
- <https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/component.py#L205-L217> (technical-description)
- <https://www.vulncheck.com/advisories/hyperspy-before-2.6.0-code-execution-via-sympy-sympify-in-hspy-zspy-files> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-138117](https://www.cve.org/CVERecord?id=CVE-2026-138117), CVE Terms of Use, modified 2026-11-28
- NVD: [CVE-2026-138117](https://nvd.nist.gov/vuln/detail/CVE-2026-138117), Public domain, modified 2026-11-28

---

Page: https://cve.day/CVE-2026-138117 · Whole record: https://cve.day/CVE-2026-138117.json · Rebuilt by cve.day 2026-11-28T02:32:32.335Z
