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.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
HyperSpy HyperSpy
Default version status: unaffected
1.2.0 to < 2.6.0affected
pkg:pypi/hyperspyReferences
- https://github.com/hyperspy/hyperspy/security/advisories/GHSA-632c-gw75-99r3 ↗
- https://github.com/hyperspy/hyperspy/commit/fe484c936b9a1d425813e145298f9eeb1d83abf6 ↗
- https://github.com/hyperspy/hyperspy/commit/973c9f9ce5937a022afe718f4f63c410eb96539e ↗
- https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0 ↗
- https://github.com/hyperspy/hyperspy/issues/3699 ↗
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/axes.py#L1031-L1071 ↗
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/_components/expression.py#L58-L66 ↗
- https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/component.py#L205-L217 ↗
- https://www.vulncheck.com/advisories/hyperspy-before-2.6.0-code-execution-via-sympy-sympify-in-hspy-zspy-files ↗