{"id":"CVE-2026-31239","aliases":["CVE-2026-31239","GHSA-pq2f-x424-6fjm","PYSEC-2026-406"],"related":[],"kind":"vulnerability","state":"published","title":"mamba language model framework vulnerable to insecure deserialization when loading pre-trained models from HuggingFace Hub","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"El framework del modelo de lenguaje mamba hasta la versión 2.2.6 es vulnerable a deserialización insegura (CWE-502) al cargar modelos preentrenados desde HuggingFace Hub. El método MambaLMHeadModel.from_pretrained() utiliza torch.load() para cargar el archivo de pesos pytorch_model.bin sin habilitar el parámetro restrictivo de seguridad weights_only=True. Esto permite la deserialización de objetos Python arbitrarios a través del módulo pickle. Un atacante puede explotar esto publicando un repositorio de modelos malicioso en HuggingFace Hub. Cuando una víctima carga un modelo desde este repositorio, se ejecuta código arbitrario en el sistema de la víctima en el contexto del proceso mamba.","source":"nvd"}],"published":"2026-05-12T00:00:00.000Z","modified":"2026-11-16T15:30:04.640Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.2.6"}],"ecosystem":"PyPI","package":"mamba-ssm","purl":"pkg:pypi/mamba-ssm","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.2.6"}],"ecosystem":"PyPI","package":"mamba-ssm","purl":"pkg:pypi/mamba-ssm","source":"pysec"}],"references":[{"url":"https://github.com/state-spaces/mamba","tags":["package"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.notion.so/CVE-2026-31239-35d1e1393188810d9baedfbd8363f396","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31239","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mamba-ssm/PYSEC-2026-406.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/mamba-ssm","tags":["package","web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-pq2f-x424-6fjm","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-05-14T16:52:22.756Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31239","url":"https://www.cve.org/CVERecord?id=CVE-2026-31239","licence":"CVE Terms of Use","modified":"2026-05-14T19:54:17.202Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pq2f-x424-6fjm","url":"https://github.com/advisories/GHSA-pq2f-x424-6fjm","licence":"CC-BY-4.0","modified":"2026-11-16T15:30:04.640Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31239","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31239","licence":"Public domain","modified":"2026-10-19T22:10:00.130Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-406","url":"https://osv.dev/vulnerability/PYSEC-2026-406","licence":"CC-BY-4.0","modified":"2026-07-01T20:22:56.958Z"}],"updatedAt":"2026-11-25T22:59:21.389Z","epss":{"score":0.00409,"percentile":0.37294,"date":"2026-12-01T12:00:22.000Z"}}