{"id":"CVE-2026-31239","aliases":["EUVD-2026-29562","GHSA-pq2f-x424-6fjm","PYSEC-2026-406"],"status":"published","title":"mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-11","score":0.00409,"percentile":0.35676,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-502"],"published":"2026-05-12T00:00:00Z","modified":"2026-10-19T22:10:00Z","affected":[{"source":"ghsa","ecosystem":"PyPI","package":"mamba-ssm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.2.6"}]}]},{"source":"osv","ecosystem":"PyPI","package":"mamba-ssm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.2.6"}]}],"versions":["1.0.1","1.1.0","1.1.1","1.1.2","1.1.3.post1","1.1.4","1.2.0","1.2.0.post1","1.2.1","1.2.2","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.1.0","2.2.0","2.2.1","2.2.2","2.2.3.post2","2.2.4","2.2.5"]},{"source":"osv","ecosystem":"PyPI","package":"mamba-ssm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.2.6"}]}],"versions":["1.0.1","1.1.0","1.1.1","1.1.2","1.1.3.post1","1.1.4","1.2.0","1.2.0.post1","1.2.1","1.2.2","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.1.0","2.2.0","2.2.1","2.2.2","2.2.3.post2","2.2.4","2.2.5"]}],"references":[{"url":"https://github.com/state-spaces/mamba","tags":["package"]},{"url":"https://www.notion.so/CVE-2026-31239-35d1e1393188810d9baedfbd8363f396","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31239","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-pq2f-x424-6fjm","tags":["advisory"]},{"url":"https://pypi.org/project/mamba-ssm","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-31239","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.","status":"published","published":"2026-05-12T00:00:00Z","modified":"2026-05-14T19:54:17.202Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:19:51.277563Z"}],"euvd":[{"id":"EUVD-2026-29562","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.","status":"published","published":"2026-05-12T00:00:00Z","modified":"2026-05-14T19:54:17Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T19:04:30.595644Z"}],"ghsa":[{"id":"GHSA-pq2f-x424-6fjm","title":"mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub","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.","status":"published","published":"2026-05-12T18:30:41Z","modified":"2026-05-27T22:09:56Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:40:14.666177Z"}],"nvd":[{"id":"CVE-2026-31239","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.","status":"published","published":"2026-05-12T18:16:52.32Z","modified":"2026-10-19T22:10:00.13Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:12:18.613259Z"}],"osv":[{"id":"GHSA-pq2f-x424-6fjm","title":"mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub","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.","status":"published","published":"2026-05-12T18:30:41Z","modified":"2026-06-29T12:26:10.536535551Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T15:46:53.244788Z"},{"id":"PYSEC-2026-406","title":"mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub","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.","status":"published","published":"2026-06-29T11:50:49.341783Z","modified":"2026-07-01T20:22:56.958502Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:57.255153Z"}]}}
