CVE-2026-138117
HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files
High · 8.5Fix available
- CVSS
- 8.5
- EPSS
- —
- Published
- 2026-11-28
- Age
- 12h old
- Modified
- 2026-11-28
- Product
- HyperSpy HyperSpy
- Aliases
- GHSA-632c-gw75-99r3
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
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.
Fixed in
2.6.0
Affected packages
| Ecosystem | Package | Range | Fixed |
|---|---|---|---|
| vendor | HyperSpy | >=1.2.0, <2.6.0 | 2.6.0 |
Sources
- NVD · first seen 12h ago · NVD terms of use
- OSV · first seen 11h ago · CC-BY 4.0
- CVE List · first seen 12h ago · CVE Terms of Use
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
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138117.json advisory
- https://github.com/hyperspy/hyperspy package
- https://nvd.nist.gov/vuln/detail/CVE-2026-138117 advisory