Technical impact
HyperSpy versions from 1.2.0 up to, but not including, 2.6.0 allow an attacker to insert malicious Python code into .hspy or .zspy files. The vulnerability is caused by untrusted expression strings being passed to sympy.sympify, which evaluates the string as executable Python code during file loading or model restoration. An attacker can embed arbitrary code in the axis, Expression component, or twin function expressions, leading to full code execution in the context of the user running hyperSpy.
Affected Systems
The affected product is HyperSpy. Any installation using HyperSpy 1.2.0 through 2.5.x may be vulnerable. The vulnerability is documented as affecting all releases before 2.6.0. No specific minor or patch versions were listed in the CNA information.
Risk and Exploitability
The CVSS score is 8.5, indicating a high severity of code execution. No EPSS score is available and the vulnerability is not listed in CISA's KEV catalog. The attack vector is inferred to be local file ingestion, likely requiring the victim to open a crafted .hspy or .zspy file using hs.load() or a related restore operation. Because the code is executed within the Python interpreter, the impact can reach system privileges depending on the runtime environment. The vulnerability is not known to be actively exploited yet but poses significant risk if used in a local or network context where untrusted files are processed.