CVE-2026-138117: HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files

Published Nov 28, 2026
·
Updated

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

1 affected component
pypi/hyperspy>=1.2.0<2.6.0

Event History

Nov 28, 2026
CVE Published
via MITRE·01:43 AM
Data Sourced
via MITRE·01:43 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

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.

2

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.

3

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203