Categories
CVE-2026-31239 critical CVSS 9.8

Unsafe Deserialization in mamba-ssm (CVE-2026-31239)

Summary

Vulnerability in mamba-ssm (CVE-2026-31239). Successful exploitation can lead to full system takeover.

Original description

The description as published by the source.

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: GitHub Security Advisories (Global) NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-31239 has been found in mamba-ssm.
Successful exploitation can lead to full system takeover. CVSS score: 9.8/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "mamba-ssm CVE-2026-31239" on the vendor's site.

CVE-2026-31239 (mamba-ssm) — CWE-502 / CVSS v3 9.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Unsafe deserialization (CWE-502) exists in mamba-ssm.

📍 Affected scope

Check the vendor advisory for the affected versions of mamba-ssm.

🔥 Severity

Severity: Critical (CVSS 9.8/10). Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to the patched release per vendor advisory.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'mamba-ssm' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'mamba-ssm' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で mamba-ssm を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

pip mamba-ssm
[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}]
PyPI mamba-ssm
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.2.6"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details