CVE-2026-31239

Published May 12, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pq2f-x424-6fjm mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Insecure Deserialization in Mamba Language Model Framework 2.2.6 Allows Remote Code Execution
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
First Time appeared State-spaces
State-spaces mamba
Vendors & Products State-spaces
State-spaces mamba
Type Values Removed Values Added
Title Insecure Deserialization in Mamba Language Model Framework 2.2.6 Allows Remote Code Execution
Weaknesses CWE-502
Type Values Removed Values Added
Description 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
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
May 14, 2026, 7:54 PM
Reserved
Mar 9, 2026, 12:00 AM
Status
Deferred
Published
May 12, 2026, 6:16 PM
Modified
Oct 19, 2026, 10:10 PM