# CVE-2026-31250: FunAudioLLM CosyVoice insecure deserialization in average_model.py

Source: https://junglewise.ai/threats/cve-2026-31250-funaudiollm-cosyvoice-insecure-deserialization-in-average-model  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-11. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-31250 · Severity: high · CVSS 7.3 · Published 2026-05-11

CosyVoice, a large-scale voice generation and training model, contains a security flaw in its model averaging tool. If a user is tricked into processing a malicious model file, an attacker can execute arbitrary commands on the user's computer. This could lead to a total system takeover, data theft, or the installation of malware.

Technologies: [FunAudioLLM CosyVoice](https://junglewise.ai/threats/technologies/cosyvoice). Vendors: [FunAudioLLM](https://junglewise.ai/threats/vendors/funaudiollm).

## Quick answers

**Is CVE-2026-31250 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-31250 being exploited in the wild.

**How severe is CVE-2026-31250?** High severity, with a CVSS score of 7.3, published 11 May 2026.

**Which products and versions are affected?** FunAudioLLM CosyVoice thru commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e.

**Is there a fix for CVE-2026-31250?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-31250 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-31250?** Check whether you run FunAudioLLM CosyVoice at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An insecure deserialization vulnerability (CWE-502) exists in the `average_model.py` script of CosyVoice. The root cause is the use of `torch.load()` to process PyTorch checkpoint files (`epoch_*.pt`) without the `weights_only=True` parameter enabled. Because `torch.load()` utilizes the Python `pickle` module by default, it is susceptible to the deserialization of arbitrary Python objects. An attacker can exploit this by crafting a malicious checkpoint file; when a victim attempts to use the model averaging tool on a directory containing this file, the malicious payload is executed. This requires the victim to manually run the tool on the attacker-supplied file.

## Affected products

- FunAudioLLM CosyVoice thru commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e

## Timeline

- 2026-05-11: advisory: CVE-2026-31250 published by NVD/MITRE

## References

- [https://github.com/FunAudioLLM/CosyVoice](https://github.com/FunAudioLLM/CosyVoice)
- [https://www.notion.so/CVE-2026-31250-35d1e13931888147a9a3e1c5e239a0a7](https://www.notion.so/CVE-2026-31250-35d1e13931888147a9a3e1c5e239a0a7)

## Related threats

- [FunAudioLLM CosyVoice insecure deserialization in model loading](https://junglewise.ai/threats/cve-2026-31232-funaudiollm-cosyvoice-insecure-deserialization-in-model-loading)
- [FunAudioLLM CosyVoice insecure deserialization in model loading](https://junglewise.ai/threats/cve-2026-31252-funaudiollm-cosyvoice-insecure-deserialization-in-model-loading)
- [FunAudioLLM CosyVoice insecure deserialization in gRPC server](https://junglewise.ai/threats/cve-2026-31251-funaudiollm-cosyvoice-insecure-deserialization-in-grpc-server)
- [FunAudioLLM CosyVoice insecure deserialization in make_parquet_list.py](https://junglewise.ai/threats/cve-2026-31249-funaudiollm-cosyvoice-insecure-deserialization-in-make-parquet)
