CVE-2026-31252 Deserialization in n/a
Attackers can execute arbitrary code by providing malicious model files to CosyVoice, which insecurely deserializes them during loading.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-31252?
CVE-2026-31252 is a medium-severity unsafe deserialization vulnerability in n/a, published on 11 May 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
CosyVoice thru commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e (2025-30-21) contains an insecure deserialization vulnerability (CWE-502) in its model loading component. The framework uses torch.load() to load model weight files (e.g., llm.pt, flow.pt, hift.pt) 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 providing a malicious model directory containing specially crafted model files. When a victim starts the CosyVoice Web UI pointing to this directory, arbitrary code is executed on the victim's system during the model loading process.
Which versions are affected by CVE-2026-31252?
How do I fix CVE-2026-31252?
No fix has been published for CVE-2026-31252 yet. Limit exposure of the affected software until one is available.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2026-31252 being exploited?
There is no known exploitation of CVE-2026-31252 in the wild and no public exploit code.
Sources
Also known as GHSA-4xxc-9mf8-p66h.