CVE-2026-138117: HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files
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.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Users of HyperSpy versions from 1.2.0 through versions before 2.6.0 are exposed when they load attacker-controlled .hspy or .zspy files, or restore affected models.
What must an attacker provide to trigger code execution?
The attacker must craft a malicious .hspy or .zspy file containing expression strings in axis data, an Expression component, or twin-function expressions. Code executes when the victim calls hs.load() or restores the model.
Is user interaction required?
Yes. The victim must load the malicious file or restore the malicious model; the vector is local and does not require attacker privileges.