CVE-2026-138117
Received Received - Intake

Code Execution via Malicious Expression Strings in HyperSpy

Vulnerability report for CVE-2026-138117, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-28

Last updated on: 2026-11-28

Assigner: VulnCheck

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 Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-28
Last Modified
2026-11-28
Generated
2026-11-28
AI Q&A
2026-11-28
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
HyperSpy HyperSpy From 1.2.0 (inc) to 2.6.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-95 The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

HyperSpy versions 1.2.0 to 2.5.0 are vulnerable to arbitrary code execution via malicious expression strings in .hspy or .zspy files. The issue occurs when HyperSpy uses sympy.sympify() to evaluate stored expressions, which internally uses Python's eval(). Attackers can embed malicious payloads in axis definitions, Expression components, or twin functions that execute when victims load files or restore models.

Detection Guidance

Detecting this vulnerability requires checking HyperSpy versions and inspecting .hspy or .zspy files for malicious expressions. Use 'pip show hyperspy' to check installed version. If version is below 2.6.0, the system is vulnerable. For file inspection, use a text editor or 'strings' command on suspicious files to look for unusual expressions like 'import os' or '__import__' in axis or component definitions.

Impact Analysis

This vulnerability allows attackers to execute arbitrary Python code on your system with your privileges when you open a crafted .hspy or .zspy file. It can compromise analysis workstations, steal data, or perform other malicious actions without visible anomalies in the loaded data.

Compliance Impact

This vulnerability could lead to data breaches, unauthorized code execution, and loss of data integrity, potentially violating GDPR and HIPAA requirements for data protection and access controls. Organizations using vulnerable HyperSpy versions may face compliance violations if exploited.

Mitigation Strategies

Immediately upgrade HyperSpy to version 2.6.0 or later using 'pip install --upgrade hyperspy'. Avoid opening .hspy or .zspy files from untrusted sources. If upgrading is not possible, disable HyperSpy file loading or use a sandboxed environment for file processing. Monitor for suspicious activity on systems running HyperSpy.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-138117. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...