Summary
The mamba language model framework (mamba-ssm package, up to version 2.2.6) is vulnerable to insecure deserialization (CWE-502) when loading models from HuggingFace Hub. The source rates it critical severity with a CVSS score of 9.8.
What happened
The MambaLMHeadModel.from_pretrained() method uses torch.load() to load the pytorch_model.bin weight file without enabling the restrictive weights_only=True parameter. This allows arbitrary Python objects to be deserialized through the pickle module. An attacker could publish a malicious model repository on HuggingFace Hub; if a victim loads a model from that repository, arbitrary code would be executed on their system in the context of the mamba process. Identifiers: CVE-2026-31239 and GHSA-pq2f-x424-6fjm.
Why it matters
The source reports a CVSS 3.1 score of 9.8 (vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) and critical severity, with high impact on confidentiality, integrity and availability. According to the available information, CISA's KEV catalog does not list this vulnerability as actively exploited, and the source provides no evidence that it is a zero-day.
Affected products and versions
mamba-ssm (PyPI ecosystem): versions <= 2.2.6. The source does not state a fixed version.
| Product | Versions | Fixed in |
|---|---|---|
| mamba-ssm | <= 2.2.6 | — |
Action recommended by the source
The source does not state a fixed version or a vendor mitigation. Readers are advised to check the GitHub advisory (GHSA-pq2f-x424-6fjm) and the PyPI package page for updates.
Sources and references
- https://github.com/advisories/GHSA-pq2f-x424-6fjm — GHSA
- https://nvd.nist.gov/vuln/detail/CVE-2026-31239 — GHSA
- https://www.notion.so/CVE-2026-31239-35d1e1393188810d9baedfbd8363f396 — GHSA
- https://github.com/pypa/advisory-database/tree/main/vulns/mamba-ssm/PYSEC-2026-406.yaml — GHSA
- https://pypi.org/project/mamba-ssm — GHSA
Weaknesses (CWE): CWE-502
Relevant change history
Published
Advisory published.