Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. mamba-ssm
  4. ›
  5. CVE-2026-31239

CVE-2026-31239: mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub

May 12, 2026 (updated May 27, 2026)

The mamba language model framework thru 2.2.6 is vulnerable to insecure deserialization (CWE-502) when loading pre-trained models from HuggingFace Hub. The MambaLMHeadModel.from_pretrained() method uses torch.load() to load the pytorch_model.bin weight file without enabling the security-restrictive weights_only=True parameter. This allows the deserialization of arbitrary Python objects via the pickle module. An attacker can exploit this by publishing a malicious model repository on HuggingFace Hub. When a victim loads a model from this repository, arbitrary code is executed on the victim’s system in the context of the mamba process.

References

  • github.com/advisories/GHSA-pq2f-x424-6fjm
  • github.com/state-spaces/mamba
  • nvd.nist.gov/vuln/detail/CVE-2026-31239
  • www.notion.so/CVE-2026-31239-35d1e1393188810d9baedfbd8363f396

Code Behaviors & Features

Detect and mitigate CVE-2026-31239 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 2.2.6

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

pypi/mamba-ssm/CVE-2026-31239.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:25 +0000.