Code execution in HyperSpy via sympy.sympify() in HSPY and ZSPY files
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-95.
Summary
HyperSpy from 1.2.0 before 2.6.0 evaluates attacker-supplied expression strings with sympy.sympify(), which is a flaw in improper neutralization of dynamically evaluated code (CWE-95). An attacker can craft .hspy or .zspy files with malicious axis, Expression component, or twin function expressions that run Python code when a victim calls hs.load() or restores models, and the victim must open the file.
Written with Claude Haiku 5.5 from the sources below · 2026-11-28
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Upgrade HyperSpy to version 2.6.0.
Written with Claude Haiku 5.5 from the sources below · 2026-11-28
- Fix · CNA HyperSpy (HyperSpy) Fixed in 2.6.0
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
HyperSpy 2.6.0
2 records Highest priority Priority HIGH 1 HIGH, 1 LOW
Other records, highest priority first
- TI-2026-99396 Insecure deserialization in HyperSpy lets model files run codePriority HIGH 72
Timeline
- 2026-11-28 Threatist record created from CVE-2026-138117
- 2026-11-28 Alias added: GHSA-9qmf-m9r2-5w65
References
Patch 2
More HyperSpy vulnerabilities
- TI-2026-99396 Insecure deserialization in HyperSpy lets model files run code CVSS 4.0HIGH 8.5
Sources
- CVE-2026-138117 · CVE Program
- CVE-2026-138117 · NVD
- FIRST EPSS
- GHSA-9qmf-m9r2-5w65 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences