MAMBA-SSM · CVE-2026-31239 · AI agents & MCP
NO FIX YET
The mamba-ssm language model library calls torch.load() without weights_only=True in MambaLMHeadModel.from_pretrained(), so a model file's pickle data is executed as Python. An attacker who publishes a malicious model repository on HuggingFace Hub gets code execution in the process of any victim who loads it.
first public May 12, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Any application that calls MambaLMHeadModel.from_pretrained() on a model repository from HuggingFace Hub, including training and inference jobs and notebooks, is exposed. Code that only loads models you built yourself or hosts from a trusted source is at much lower risk. The sources do not say which versions are fixed.
Not affected if models-loaded-from-trusted-sources, no-hub-loading, safetensors-only
Who cares huggingface, mamba-ssm, ml-pipelines, pypi, python
pip show mamba-ssm and compare the version with 2.2.6 or earlier.from_pretrained( calls on MambaLMHeadModel that load untrusted repositories.Unknown from the sources.
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.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.