Vulnerability 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.
CVSS Score
HIGH
Related Weaknesses (CWE)
References
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/_components/expression
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/axes.py#L1031-L1071
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/component.py#L205-L217
- https://github.com/hyperspy/hyperspy/commit/973c9f9ce5937a022afe718f4f63c410eb96
- https://github.com/hyperspy/hyperspy/commit/fe484c936b9a1d425813e145298f9eeb1d83
- https://github.com/hyperspy/hyperspy/issues/3699
- https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0
- https://github.com/hyperspy/hyperspy/security/advisories/GHSA-632c-gw75-99r3
- https://www.vulncheck.com/advisories/hyperspy-before-2.6.0-code-execution-via-sy
FAQ
What is CVE-2026-138117?
CVE-2026-138117 is a vulnerability with a CVSS score of 7.8 (HIGH). 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 ca...
How severe is CVE-2026-138117?
CVE-2026-138117 has been rated HIGH with a CVSS base score of 7.8/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-138117?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.