CVE-2024-8502 Remote Code Execution via Deserialization in modelscope/agentscope
Attackers can execute arbitrary code on servers using the modelscope/agentscope library by sending malicious serialized data to the RPC agent server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-8502?
CVE-2024-8502 is a critical unsafe deserialization vulnerability in modelscope/agentscope, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A vulnerability in the RpcAgentServerLauncher class of modelscope/agentscope v0.0.6a3 allows for remote code execution (RCE) via deserialization of untrusted data using the dill library. The issue occurs in the AgentServerServicer.create_agent method, where serialized input is deserialized using dill.loads, enabling an attacker to execute arbitrary commands on the server.
Weakness: CWE-502
Which versions are affected by CVE-2024-8502?
3 open source packages ship an affected version, including agentscope.
| Package | Affected | Fixed in |
|---|---|---|
agentscope PyPI | All versions to 0.0.6a3 | None |
agentscope PyPI | All versions to 0.0.6a3 | None |
agentscope PyPI | All versions to 0.0.6a3 | None |
How do I fix CVE-2024-8502?
No fix has been published for CVE-2024-8502 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-2024-8502 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-8502 exists.
Sources
Also known as GHSA-9w5h-67gf-xvv8, PYSEC-2026-253.