{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.4.0"
                  },
                  {
                    "fixed": "2.6.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "28fdf2d0320c76c5d57a57e323ac510b2005e13d"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v2.6.0",
                "range": [
                  {
                    "fixed": "dbd10c9e798d1bd240d74be49ab6639d9c3a4054"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "dbd10c9e798d1bd240d74be49ab6639d9c3a4054"
            },
            {
              "fixed": "6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09"
            },
            {
              "fixed": "28fdf2d0320c76c5d57a57e323ac510b2005e13d"
            }
          ],
          "repo": "https://github.com/hyperspy/hyperspy",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-j975-x368-3hrr"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-502"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138118.json"
  },
  "details": "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 pickle payload in a component's _class_dump or a 'fn'-flagged _whitelist entry, which cloudpickle.loads() (dill in 1.x) runs when the victim restores the model.",
  "id": "CVE-2026-138118",
  "modified": "2026-11-28T02:45:36.325987479Z",
  "published": "2026-11-28T01:43:08.379Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138118.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/hyperspy/hyperspy"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/misc/export_dictionary.py#L187-L207"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L106-L146"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/hyperspy/hyperspy/blob/v2.5.0/hyperspy/model.py#L645-L661"
    },
    {
      "type": "FIX",
      "url": "https://github.com/hyperspy/hyperspy/commit/28fdf2d0320c76c5d57a57e323ac510b2005e13d"
    },
    {
      "type": "FIX",
      "url": "https://github.com/hyperspy/hyperspy/commit/6382ae0ff5b0000a7aad5dc2f4b997b1d8dccb09"
    },
    {
      "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-j975-x368-3hrr"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138118"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/hyperspy-1.4.0-before-2.6.0-insecure-deserialization-rce-via-stored-model-restoration"
    }
  ],
  "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 1.4.0 before 2.6.0 Insecure Deserialization RCE via Stored Model Restoration"
}