CVE-2026-138117
published high CVSS 4.0 · 8.5HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| HyperSpy | — | HyperSpy1.2.0 to < 2.6.0 · Other versions: unaffected | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.5 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.8 | high | VulnCheck · cna | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| HyperSpy | HyperSpy | 1.2.0 to < 2.6.0 (affected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
References
9- _parse_substitutions in expression.py (v2.5.0) https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/_components/expression.py#L58-L66
- FunctionalDataAxis.__init__ in axes.py (v2.5.0) https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/axes.py#L1031-L1071
- twin_function_expr setter in component.py (v2.5.0) https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/component.py#L205-L217
- fix(security): parse file-derived expressions with the bounded parser https://github.com/hyperspy/hyperspy/commit/973c9f9ce5937a022afe718f4f63c410eb96539e
- Merge of PR #3703 (bounded expression parser) https://github.com/hyperspy/hyperspy/commit/fe484c936b9a1d425813e145298f9eeb1d83abf6
- GitHub issue #3699 https://github.com/hyperspy/hyperspy/issues/3699
- HyperSpy v2.6.0 Release Notes https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0
- GitHub Security Advisory (GHSA-632c-gw75-99r3) https://github.com/hyperspy/hyperspy/security/advisories/GHSA-632c-gw75-99r3
- VulnCheck Advisory: HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files https://www.vulncheck.com/advisories/hyperspy-before-2.6.0-code-execution-via-sympy-sympify-in-hspy-zspy-files
Provider assertions
2VulnCheck · cna
HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 01f668c82156f9167ce5cb4210293ca0850c940f8e32e54a10fce92e8fedf602
- Ingested
- 01 Dec 2026, 21:59:30 UTC
- Source record
- Official CVE record