CVE-2024-9308
Executive Summary
CVE-2024-9308 is an open redirect vulnerability discovered in haotian-liu/llava version v1.2.0 (LLaVA-1.6). This flaw allows a remote unauthenticated attacker to craft a specially crafted URL that redirects users to arbitrary external websites. The vulnerability is classified as CWE-601 (URL Redirection to Untrusted Site) and carries a CVSS score of 6.1 (Medium). Although the EPSS score is currently 0.0%, the public availability of proof-of-concept details and the lack of an official patch make this a significant threat for phishing, malware distribution, and credential theft campaigns. The project is an open-source multimodal AI model, and no supply chain package manager (NPM, PyPI, Go, Ruby) is involved.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 6.1 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – the victim must click the crafted link
- Scope: Changed (S:C) – the redirect can lead to a different security domain
- Confidentiality Impact: Low (C:L) – potential for credential theft
- Integrity Impact: Low (I:L) – redirection to malicious sites
- Availability Impact: None (A:N)
Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction. The lack of a patch and public exploit details elevate the risk for targeted attacks.
Deep Dive & Mechanics
The open redirect vulnerability exists in the LLaVA web interface, likely in a URL parameter that handles redirection after authentication or page navigation. An attacker can craft a URL such as:
https://victim-llava-instance.com/redirect?url=http://evil.com
When a user clicks this link, the application does not validate the destination domain, allowing redirection to any external site. This can be used to:
- Phishing: Redirect users to a fake login page to steal credentials.
- Malware Distribution: Redirect to a drive-by download site.
- Credential Theft: Capture OAuth tokens or session cookies via a malicious landing page.
The vulnerability is triggered by a lack of server-side validation of the url parameter. The application likely uses a function like redirect(url) without checking if the URL belongs to an allowed domain.
Vulnerable vs. Patched Code
Vulnerable Code (v1.2.0):
# Example vulnerable redirect handler
@app.route('/redirect')
def redirect_handler():
target = request.args.get('url')
return redirect(target)
Patched Code (Hypothetical):
# Patched version with domain whitelist
from urllib.parse import urlparse
ALLOWED_DOMAINS = ['example.com', 'localhost']
@app.route('/redirect')
def redirect_handler():
target = request.args.get('url')
parsed = urlparse(target)
if parsed.netloc in ALLOWED_DOMAINS:
return redirect(target)
else:
return abort(400, "Invalid redirect target")
The patch adds a whitelist check to ensure the redirect target is within allowed domains. As of now, no official patch has been released.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A running instance of LLaVA v1.2.0 (LLaVA-1.6)
- A controlled external server (e.g.,
http://evil.com)
Exploit Steps:
- Identify the vulnerable redirect endpoint (e.g.,
/redirect?url=). - Craft a malicious URL:
http://victim-llava-instance.com/redirect?url=http://evil.com/phishing.html - Distribute the link via email, social media, or other channels.
- When the victim clicks, they are redirected to the attacker-controlled site.
Proof-of-Concept (Python):
import requests
target = "http://victim-llava-instance.com/redirect?url=http://evil.com"
response = requests.get(target, allow_redirects=False)
print(f"Status: {response.status_code}")
print(f"Location header: {response.headers.get('Location')}")
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for unusual
redirectendpoint usage. - Look for
urlparameters containing external domains. - Use the Sigma rule below to detect suspicious redirects.
Hardening:
- Implement a whitelist of allowed redirect domains.
- Validate the
urlparameter using a server-side URL parser. - Add a warning page before redirecting to external sites.
Indicators of Compromise (IOCs)
- URL Pattern:
/redirect?url=http://or/redirect?url=https:// - Suspicious Domains: Any external domain not in the whitelist
- Log Entries:
GET /redirect?url=http://evil.comwith a 302 response - User-Agent: No specific pattern, but automated scanners may use common libraries (e.g., Python-requests)
Detection Engineering
YARA Rule
rule CVE_2024_9308_Open_Redirect {
meta:
description = "Detects open redirect attempts targeting LLaVA v1.2.0"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-9308"
strings:
$redirect = "/redirect?url=" nocase
$http = "http://" nocase
$https = "https://" nocase
condition:
$redirect and ($http or $https)
}
Sigma Rule
title: CVE-2024-9308 Open Redirect in LLaVA
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests to the vulnerable redirect endpoint with external URLs
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/redirect'
cs-uri-query|contains: 'url=http'
condition: selection
falsepositives:
- Legitimate redirects to allowed domains (if whitelist exists)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-9308 LLaVA Open Redirect Attempt"; flow:to_server; content:"GET"; http_method; content:"/redirect?url="; http_uri; content:"http://"; distance:0; within:100; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the redirect functionality or restrict it to internal domains only.
- Code Fix: Implement a whitelist of allowed redirect targets (see patched code example).
- Workaround: Use a reverse proxy (e.g., Nginx) to block requests to
/redirectwith external URLs:location /redirect { if ($arg_url ~* "^https?://") { return 403; } } - Monitoring: Enable logging and alerting for the
/redirectendpoint. - User Education: Warn users not to click suspicious links related to LLaVA instances.
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.