{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.2.0"
                  },
                  {
                    "fixed": "2.6.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "fe484c936b9a1d425813e145298f9eeb1d83abf6"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "973c9f9ce5937a022afe718f4f63c410eb96539e"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v2.6.0",
                "range": [
                  {
                    "fixed": "dbd10c9e798d1bd240d74be49ab6639d9c3a4054"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "dbd10c9e798d1bd240d74be49ab6639d9c3a4054"
            },
            {
              "fixed": "fe484c936b9a1d425813e145298f9eeb1d83abf6"
            },
            {
              "fixed": "973c9f9ce5937a022afe718f4f63c410eb96539e"
            }
          ],
          "repo": "https://github.com/hyperspy/hyperspy",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-632c-gw75-99r3"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-95"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138117.json"
  },
  "details": "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.",
  "id": "CVE-2026-138117",
  "modified": "2026-11-28T02:45:26.378220623Z",
  "published": "2026-11-28T01:43:09.488Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138117.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/hyperspy/hyperspy"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/_components/expression.py#L58-L66"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/axes.py#L1031-L1071"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/component.py#L205-L217"
    },
    {
      "type": "FIX",
      "url": "https://github.com/hyperspy/hyperspy/commit/973c9f9ce5937a022afe718f4f63c410eb96539e"
    },
    {
      "type": "FIX",
      "url": "https://github.com/hyperspy/hyperspy/commit/fe484c936b9a1d425813e145298f9eeb1d83abf6"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/hyperspy/hyperspy/issues/3699"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/hyperspy/hyperspy/releases/tag/v2.6.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/hyperspy/hyperspy/security/advisories/GHSA-632c-gw75-99r3"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138117"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/hyperspy-before-2.6.0-code-execution-via-sympy-sympify-in-hspy-zspy-files"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "HyperSpy before 2.6.0 Code Execution via sympy.sympify() in HSPY/ZSPY Files"
}