CVE-2024-48050

9.8 CRITICAL

📋 TL;DR

This vulnerability allows unauthenticated remote code execution in agentscope workflow utilities. Attackers can execute arbitrary commands through the eval() function in is_callable_expression. All users of agentscope v0.0.4 and earlier are affected.

💻 Affected Systems

Products:
  • agentscope
Versions: <= v0.0.4
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Any deployment using workflow_utils.py functions is vulnerable. The eval() function executes without proper input validation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining full control over the server, data exfiltration, and lateral movement within the network.

🟠

Likely Case

Remote code execution leading to data theft, service disruption, or deployment of malware/ransomware.

🟢

If Mitigated

Limited impact if proper network segmentation and least privilege access controls are implemented.

🌐 Internet-Facing: HIGH - Directly exploitable without authentication via exposed workflow endpoints.
🏢 Internal Only: HIGH - Even internal systems are vulnerable to authenticated or unauthenticated exploitation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public proof-of-concept exists showing direct command injection via the vulnerable eval() call. Simple exploitation requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v0.0.5 or later

Vendor Advisory: https://github.com/modelscope/agentscope

Restart Required: Yes

Instructions:

1. Check current version: pip show agentscope
2. Upgrade: pip install --upgrade agentscope
3. Restart all agentscope services
4. Verify version is > v0.0.4

🔧 Temporary Workarounds

Disable vulnerable endpoints

all

Temporarily disable or block access to workflow-related endpoints

# Configure firewall to block workflow endpoints
# Disable web interface if not required

Input validation wrapper

all

Add input sanitization before eval() call

# Modify is_callable_expression to validate input
# Replace eval() with safer alternatives like ast.literal_eval()

🧯 If You Can't Patch

  • Network segmentation: Isolate agentscope instances from critical systems
  • Implement strict input validation and WAF rules to block malicious payloads

🔍 How to Verify

Check if Vulnerable:

Check agentscope version and inspect agentscope/web/workstation/workflow_utils.py for eval() usage in is_callable_expression function

Check Version:

pip show agentscope | grep Version

Verify Fix Applied:

Verify agentscope version > v0.0.4 and confirm eval() has been removed or secured in workflow_utils.py

📡 Detection & Monitoring

Log Indicators:

  • Unusual process execution from agentscope
  • Suspicious Python eval() calls
  • Error logs containing malicious payloads

Network Indicators:

  • Unexpected outbound connections from agentscope servers
  • Traffic to workflow endpoints with command-like strings

SIEM Query:

source="agentscope" AND (eval OR exec OR system OR subprocess)

🔗 References

📤 Share & Export