CVE-2024-9439
📋 TL;DR
SuperAGI's latest version contains a critical remote code execution vulnerability in the agent template update API. Attackers can inject malicious code through unsanitized parameters that get executed via eval(), potentially compromising the entire system. All users running vulnerable SuperAGI instances are affected.
💻 Affected Systems
- SuperAGI
📦 What is this software?
Superagi by Superagi
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise allowing attackers to execute arbitrary commands, steal sensitive data, install malware, pivot to other systems, and maintain persistent access.
Likely Case
Remote code execution leading to data exfiltration, service disruption, and installation of backdoors or cryptocurrency miners.
If Mitigated
Limited impact with proper network segmentation, minimal privileges, and monitoring detecting exploitation attempts.
🎯 Exploit Status
Exploitation requires API access but the vulnerability is in a core function with clear attack vector.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Check SuperAGI repository for latest patched version
Vendor Advisory: https://huntr.com/bounties/d710884f-b5ab-4b31-a2e6-e4b38488def1
Restart Required: No
Instructions:
1. Update SuperAGI to the latest patched version from official repository. 2. Verify the eval() function is no longer used with unsanitized user input in agent template update API.
🔧 Temporary Workarounds
Disable vulnerable API endpoint
allTemporarily disable or block access to the agent template update API endpoint
# Configure firewall/WAF to block requests to /api/agent-template-update or similar endpoint
Input validation middleware
allImplement strict input validation for all API parameters
# Add input sanitization before eval() calls in code
🧯 If You Can't Patch
- Implement strict network segmentation to isolate SuperAGI instances
- Deploy WAF with RCE protection rules and monitor for exploitation attempts
🔍 How to Verify
Check if Vulnerable:
Review code for eval() usage with unsanitized user input in agent template update functionality
Check Version:
Check SuperAGI version in configuration or via package manager
Verify Fix Applied:
Test that eval() is either removed or properly sanitized in the patched version
📡 Detection & Monitoring
Log Indicators:
- Unusual API calls to agent template update endpoint
- Suspicious command execution in logs
- Error messages containing eval() failures
Network Indicators:
- Unusual outbound connections from SuperAGI host
- Traffic patterns suggesting data exfiltration
SIEM Query:
source="superagi" AND (api_endpoint="*agent-template-update*" OR message="*eval*" OR message="*RCE*")