PatchSiren cyber security CVE debrief
CVE-2026-31239 mamba-ssm CVE debrief
The mamba language model framework, through version 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. Defenders should assess exposure, as
- Vendor
- mamba-ssm
- Product
- mamba-ssm
- CVSS
- CRITICAL 9.8
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-05-12
- Original CVE updated
- 2026-11-16
- Advisory published
- 2026-05-12
- Advisory updated
- 2026-11-16
Who should care
Defenders responsible for the mamba language model framework, particularly those using versions 2.2.6 or earlier, should assess exposure and verify remediation due to the critical severity and potential for code execution.
Why it matters
The mamba language model framework vulnerability allows for arbitrary code execution, posing a critical risk to defenders. It is essential to assess exposure, verify remediation, and update to a secure version.
- Potential for arbitrary code execution on the victim's system in the context of the mamba process.
- Possible exploitation by publishing a malicious model repository on HuggingFace Hub.
- Need for verification of affected versions and remediation steps.
- Importance of updating to a secure version of the mamba framework.
Technical summary
The mamba language model framework through version 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.
Defensive priority
High priority for defenders to assess exposure and verify remediation due to the critical severity and potential for code execution.
Recommended defensive actions
- Assess exposure by checking if the mamba language model framework version 2.2.6 or earlier is in use.
- Verify if the MambaLMHeadModel.from_pretrained() method is used to load pre-trained models from HuggingFace Hub.
- Consider updating to a version of the mamba framework that enables the security-restrictive weights_only=True parameter.
- Monitor for potential malicious model repositories on HuggingFace Hub.
- Review compensating controls for exposed systems while remediation is scheduled and verified.
- Check relevant monitoring, detection, and logs for exposed assets that need extra review.
- Track exceptions, retest remediated assets, and close the item only after evidence is documented.
Evidence notes
The CVE record and source item provide details on the vulnerability, including the affected version range and potential impact. However, some information, such as specific affected versions and remediation steps, may require verification from official sources.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-31239 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-31239
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-31239 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-31239
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
mamba language model framework vulnerable to insecure deserialization when loading pre-trained m
Unverified legacy reference
URL: https://github.com/advisories/GHSA-pq2f-x424-6fjm
github_advisory_database
-
Source reference
Unverified legacy reference
URL: https://www.notion.so/CVE-2026-31239-35d1e1393188810d9baedfbd8363f396
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/pypa/advisory-database/tree/main/vulns/mamba-ssm/PYSEC-2026-406.yaml
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://pypi.org/project/mamba-ssm
Supplemental source
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.