HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files
- State
- Published
- Severity
- 8.5 High
- Published
- Nov 28, 2026
- Updated
- Nov 28, 2026
- Reserved
- Nov 27, 2026
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.
| Product | Versions |
|---|---|
| HyperSpy HyperSpy | 1.2.0 to before 2.6.0 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.5 High | VulnCheck | |
| 3.1 | 7.8 High | VulnCheck |
Weaknesses
- CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
References
- GitHub Security Advisory (GHSA-632c-gw75-99r3)Vendor Advisory
- Merge of PR #3703 (bounded expression parser)Patch
- fix(security): parse file-derived expressions with the bounded parserPatch
- HyperSpy v2.6.0 Release NotesRelease Notes
- GitHub issue #3699Issue Tracker
- FunctionalDataAxis.__init__ in axes.py (v2.5.0)Technical Details
- _parse_substitutions in expression.py (v2.5.0)Technical Details
- twin_function_expr setter in component.py (v2.5.0)Technical Details
- VulnCheck Advisory: HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY FilesThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.