Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › Vulnerabilities › HyperSpy

High 8.5 2 CVEs Analysis

HyperSpy flaws in .hspy and .zspy file handling allow arbitrary Python code execution

Two HIGH-severity (CVSS 8.5) NVD records describe separate ways that crafted HyperSpy model files can run attacker-supplied Python code. Both affect versions before 2.6.0.

What to look into

  • 2 vulnerabilities in HyperSpy: 2 high (CVSS up to 8.5).
  • None of them is known to be exploited yet.
  • Start with CVE-2026-138118 (8.5 high): HyperSpy from 1.4.0 before 2.6.0 contains an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by supplying crafted stored-model data in .hspy or .zspy fil… An attacker without an account can exploit this with local access if a user views or visits something.
  • 0 of 2 can be attacked over the network without logging in.
  • Kinds of flaws: Deserialization of Untrusted Data; Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection').
PythonVulnerabilities

Key points

  • Both CVEs are rated HIGH (CVSS 8.5) and affect HyperSpy versions before 2.6.0.
  • CVE-2026-138118 is an insecure deserialization flaw triggered when a model is restored.
  • CVE-2026-138117 is an expression-evaluation flaw via sympy.sympify() triggered by hs.load() or model restore.
  • The records name 2.6.0 as the fixed version; no workaround or exploitation status is stated.

Two code execution flaws

The batch contains two distinct code execution issues in HyperSpy, both rated HIGH with a CVSS score of 8.5. Each is triggered by a crafted .hspy or .zspy file rather than by network access, according to the records.

CVE-2026-138118 is an insecure deserialization flaw affecting HyperSpy from 1.4.0 before 2.6.0. A malicious pickle payload hidden in a component's classdump or in a 'fn'-flagged whitelist entry is run by cloudpickle.loads() (dill in 1.x) when the victim restores the model.

CVE-2026-138117 affects HyperSpy from 1.2.0 before 2.6.0. Here the problem is expression strings passed to sympy.sympify(). Malicious axis, Expression component, or twin function expressions in model files are evaluated and can execute when a victim calls hs.load() or restores models.

Who is affected and what to do

Administrators running HyperSpy from 1.2.0 or 1.4.0 up to, but not including, 2.6.0 should treat both flaws as applicable. Upgrading to 2.6.0 is the only fix the records name. They do not describe a workaround, detection method, or whether these flaws have been exploited. Until systems are updated, model files from untrusted sources should not be opened or restored.

What to do

  1. Upgrade HyperSpy to version 2.6.0 or later.
  2. Do not open or restore .hspy or .zspy files from untrusted sources until upgraded.

Our article about all 2 vulnerabilities, written with AI assistance from the official records listed below. Each CVE's page has its details.

The 2 vulnerabilities

  • CVE-2026-138118 8.5 HyperSpy from 1.4.0 before 2.6.0 contains an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by supplying crafted stored-model data in .hspy or .zspy files. Attackers can embed a malicious pick…
  • CVE-2026-138117 8.5 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 malic…

Frequently asked questions

How many HyperSpy vulnerabilities were published on November 28, 2026?

2 vulnerabilities: 2 high, with CVSS scores up to 8.5.

Are any of them being exploited?

None of them is in CISA's Known Exploited Vulnerabilities catalog yet.

Which one should be fixed first?

CVE-2026-138118 (CVSS 8.5): HyperSpy from 1.4.0 before 2.6.0 contains an insecure deserialization vulnerability that allows attackers to execute arbitrary Python code by supplying crafted stored-model data in .hspy or .zspy fil…

Original records