☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Comfast logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 7.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L 🐛 CWE-74
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-77004

CVE-2026-77004 Command Injection in Comfast
📅 PUBLISHED: 2026-08-20 00:00 UTC 🔄 UPDATED: 2026-09-23 12:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.28%
👁️
1.28% probability
32.0× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: United States License: Open Source
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS VECTOR BREAKDOWN 7.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
7.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Threat Intelligence Report: CVE-2026-77004


Executive Summary

CVE-2026-77004 is a command injection vulnerability in the Comfast CF-N1-S wireless router firmware version 2.6.0.1. The flaw resides in the sprintf function of the /cgi-bin/mbox-config endpoint when the sn argument is processed with method SET and section ptest_sn. A remote authenticated attacker can inject arbitrary operating system commands, leading to full device compromise. With a CVSS score of 7.4, a published public exploit, and no vendor patch available, this vulnerability poses an immediate risk to exposed Comfast devices.

⚡ 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

Technical Analysis

Vulnerability Mechanism

The vulnerability is a classic command injection flaw (CWE-74 — Improper Neutralization of Special Elements in Output Used by a Downstream Component). The NVD description identifies the root cause as improper use of the C library function sprintf in the file /cgi-bin/mbox-config.

The sprintf function is a formatted string output function that writes formatted data to a string buffer without bounds checking. In this specific case, the vulnerability is not a buffer overflow per se — the injection vector is the untrusted content of the sn argument being passed through sprintf and eventually reaching a system shell execution context (likely via system(), popen(), or exec() calls downstream — though the NVD description does not confirm which exact sink is used).

The flaw class is as follows:

  1. Input handling: The CGI script /cgi-bin/mbox-config receives an HTTP request with method parameter method=SET and section parameter section=ptest_sn.
  2. Data flow: The value of the sn argument is read from the HTTP request and passed to sprintf without sanitization.
  3. Sink: The formatted result is used in a context where shell metacharacters (e.g., ;, &&, |, backticks, $(command)) are interpreted by the operating system shell.
  4. Impact: An attacker injects commands that execute with the privileges of the CGI process — typically root on embedded router platforms.

Attack Surface

The /cgi-bin/mbox-config endpoint is part of the device's web management interface. The attack vector attributes in the CVSS vector indicate:

  • AV:N — Network attack vector; the endpoint is remotely accessible.
  • AC:L — Low attack complexity; no special conditions are required.
  • PR:L — Requires low-privilege authentication. The attacker must have a valid account on the router's web interface (often default credentials such as admin/admin are not changed by home users).
  • UI:N — No user interaction required.
  • S:C — Scope changed; the compromised component (web interface) can affect resources beyond its security scope, meaning the injected command executes outside the web application sandbox.

Affected Component

  • Device: Comfast CF-N1-S (wireless router)
  • Firmware: 2.6.0.1
  • Entry Point: POST/GET to /cgi-bin/mbox-config with method=SET&section=ptest_sn&sn=<malicious_payload>
  • Vulnerable Function: sprintf (C standard library)

Attack Vector Summary

The attacker crafts an HTTP request to the device's web interface, supplying a malicious value in the sn parameter. Because the device uses sprintf to build a system command string with this parameter unsanitized, shell metacharacters in the sn value are interpreted by the OS shell, executing arbitrary commands on the device.


Exploitation Scenarios

Prerequisites

  • Network access to the device's management interface (port 80/443 typically).
  • Valid low-privilege credentials (factory default or user-provided).
  • Public exploit is available (per NVD description).

Attack Chain Steps

Step 1 — Reconnaissance / Target Identification

Attackers scan for Comfast CF-N1-S devices exposed to the internet. Common techniques include:

  • Shodan/Censys queries for HTTP response fingerprints containing "Comfast" or router model identifiers.
  • Banner grabbing on common admin ports (TCP 80, 443, 8080) to identify the device.
  • Default credential testing (admin/admin, root/root, etc.) to establish low-privilege access.

Step 2 — Triggering the Vulnerability

The attacker sends an HTTP request to the vulnerable endpoint:

GET /cgi-bin/mbox-config?method=SET&section=ptest_sn&sn=test HTTP/1.1
Host: <target>
Authorization: Basic <base64-credentials>

Because authentication is required (PR:L), the request must include valid session credentials.

Step 3 — Payload Execution

The attacker modifies the sn parameter to include shell metacharacters. At the vulnerability-class level, the payload pattern is:

sn=test;command_to_execute
sn=test && command_to_execute
sn=$(command_to_execute)
sn=`command_to_execute`

For example, a payload like sn=test;reboot would cause the device to reboot, demonstrating command execution. More common exploitation would use a reverse shell payload or command to download and execute malware.

Step 4 — Post-Exploitation Impact

Once command execution is achieved (typically as root on embedded devices), the attacker can:

  • Establish persistent reverse shells or bind shells.
  • Extract configuration files containing WiFi passphrases, PPPoE credentials, or administrative hashes.
  • Modify device DNS settings to redirect traffic (DNS hijacking for phishing or ad injection).
  • Add the device to a botnet (Mirai-style) for DDoS operations.
  • Pivot to the internal network the device bridges.

Exploitation Notes

The NVD description states: "The exploit has been published and may be used." This indicates that functional exploit code is publicly accessible, lowering the skill barrier for attackers. However, no specific PoC code or Nuclei template is available in this report's data set, so the precise payload structure cannot be quoted beyond the vulnerability class level.


Impact Assessment

CVSS Breakdown Context

  • Severity Score: 7.4 (High)
  • Base Vector: AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

The scope change (S:C) is significant — the web interface compromise transcends into the operating system layer. While individual CIA impacts are rated Low, the cumulative effect on a network gateway device is disproportionate:

  • Confidentiality (Low): Access to device configuration and credentials.
  • Integrity (Low): Modification of device settings, DNS, firewall rules.
  • Availability (Low): Device reboot, DoS via resource exhaustion, or firmware corruption.

Business Impact

Impact Dimension Assessment
Affected Systems Comfast CF-N1-S routers with firmware 2.6.0.1
Deployment SMB/home offices, retail environments, small branch locations
Blast Radius Single device compromise can expose LAN traffic, enable MITM attacks, and provide a foothold for lateral movement
Data Exposure WiFi credentials, VPN settings, ISP credentials, local network topology
Availability Risk Remote reboot, factory reset, complete bricking possible
Botnet Risk Device is a candidate for Mirai-like IoT botnet recruitment

Regulatory Considerations

  • For organizations using these devices in a business context, this vulnerability may trigger breach notification obligations if sensitive customer data traverses compromised networks.
  • PCI-DSS environments where these routers handle cardholder data would face compliance violations.

Detection Guidance

Sigma Rule

title: Comfast CF-N1-S Command Injection via mbox-config sn Parameter
id: 9e2a4c42-8a9d-4f04-9b39-2f1c6f8a335d
status: experimental
description: Detects command injection attempts against Comfast CF-N1-S router /cgi-bin/mbox-config endpoint by identifying shell metacharacters in the sn parameter.
logsource:
  product: web
  service: http
detection:
  selection:
    cs-uri-path:
      - '/cgi-bin/mbox-config'
    cs-uri-query:
      - '*method=SET*'
      - '*section=ptest_sn*'
    cs-uri-query|contains:
      - 'sn=*;*'
      - 'sn=*|*'
      - 'sn=*&&*'
      - 'sn=*`*'
      - 'sn=*$(*'
  condition: selection
falsepositives:
  - Legitimate administration using unusual characters in serial number field (very unlikely)
level: critical

YARA Rule

rule Comfast_CFN1S_SN_CommandInjection
{
    meta:
        author = "Valtersit Threat Intel"
        description = "Detects HTTP payloads targeting Comfast CF-N1-S mbox-config command injection"
        cve = "CVE-2026-77004"
        date = "2026-01-01"
        severity = "high"
        reference = "NVD: CVE-2026-77004"

    strings:
        $endpoint = "/cgi-bin/mbox-config" ascii nocase
        $method_set = "method=SET" ascii nocase
        $section_ptest = "section=ptest_sn" ascii nocase
        $shell_semi = "sn=" ascii nocase
        $meta_semicolon = ";"
        $meta_pipe = "|"
        $meta_and = "&&"
        $meta_backtick = "`"
        $meta_dollar = "$("
        $meta_newline = "%0a" ascii nocase

    condition:
        all of them and 1 of ($meta_*)
}

Suricata IDS Rule

alert http any any -> $HOME_NET any (
    msg:"ET EXPLOIT Comfast CF-N1-S Command Injection Attempt (CVE-2026-77004)";
    flow:to_server,established;
    content:"/cgi-bin/mbox-config"; http_uri; nocase;
    content:"method=SET"; http_uri; nocase;
    content:"section=ptest_sn"; http_uri; nocase;
    pcre:"/sn=[^&]*(?:;|\||&&|`|\$\(|%0a)/Ui";
    classtype:attempted-admin;
    sid:202677004;
    rev:1;
    metadata:created_at 2026-01-01, cve CVE-2026-77004;
)

Elastic Detection

// Elastic EQL query for HTTP endpoint logs (Packetbeat or Filebeat HTTP module)
sequence by source.ip
  [ network where network.protocol == "http" and
    http.request.path == "/cgi-bin/mbox-config" and
    http.request.body like "*method=SET*" and
    http.request.body like "*section=ptest_sn*" and
    (http.request.body like "*sn=*;*" or
     http.request.body like "*sn=*|*" or
     http.request.body like "*sn=*&&*" or
     http.request.body like "*sn=*`*" or
     http.request.body like "*sn=*$*(*")
  ]

Splunk SPL Query

index=web sourcetype=access_combined OR sourcetype=pan:traffic
| where uri_path="/cgi-bin/mbox-config"
| where uri_query LIKE "%method=SET%" AND uri_query LIKE "%section=ptest_sn%"
| regex uri_query="sn=[^&]*(;|\||&&|`|\$\(|%0a)"
| stats count by src_ip, dest_ip, uri, _time
| sort - _time

Wazuh OSSEC Rule

<group name="web,exploit,cve_2026_77004,">
  <rule id="331088" level="15">
    <decoded_as>json</decoded_as>
    <field name="url">/cgi-bin/mbox-config</field>
    <match>method=SET|section=ptest_sn</match>
    <regex>sn=[^&]*(;|\||&&|`|\$\(|%0a)</regex>
    <description>Comfast CF-N1-S Command Injection Attempt (CVE-2026-77004)</description>
    <mitre>
      <id>T1190</id>
    </mitre>
    <group>command_injection,</group>
  </rule>
</group>

Mitigation & Patch Guidance

Patch Confidence Assessment

UNPATCHED — 0/4 confidence. No patch evidence from any tracked source. Vendor has not released a firmware update. Affected version list is empty (exact version 2.6.0.1 confirmed vulnerable).

1. Immediate Mitigations (No Patch Available)

Priority Action Effort
1 Restrict network access: Do not expose the web management interface (ports 80, 443, 8080) to the internet. Apply firewall rules to allow management only from trusted LAN IPs or VPN subnet. Low
2 Change default credentials: Ensure non-default strong passwords are set for all httpd accounts. Weak credentials lower the PR:L bar to trivial. Low
3 Disable remote management: If WAN-side management is not business-required, disable it entirely. Low
4 Network segmentation: Place the device behind a firewall with strict egress filtering if it must be internet-facing. Medium
5 Monitor logs: Enable syslog forwarding and alert on any access to /cgi-bin/mbox-config. Medium

2. Patch/Upgrade Steps

  • Contact Comfast support for firmware patch status. As of this report, no fixed version exists.
  • Isolate vulnerable devices until a patched firmware (2.6.0.2 or later) is released.
  • Monitor vendor channels (Comfast official website, firmware update portal) for CVE-2026-77004 remediation.
  • If a patched firmware becomes available, test in a lab environment before deploying to production devices.

3. Long-Term Hardening

  1. Replace vulnerable hardware: If CF-N1-S devices are mission-critical, consider replacing them with alternatives from vendors with active security support.
  2. Implement network-level controls:
    • Use an IDS/IPS (Suricata/Snort) with the rule above to block exploit attempts in transit.
    • Apply egress filtering to prevent reverse-shell callbacks from compromised devices.
  3. Configuration management:
    • Maintain an asset inventory of all network devices.
    • Establish a firmware update cadence and track CVEs affecting your device fleet.
  4. Access control:
    • Move management interfaces to dedicated VLANs.
    • Use centralized authentication (RADIUS/TACACS+) if the device supports it.
  5. Compensating controls:
    • Deploy a WAF in front of any exposed device management interfaces.
    • Use Honeypot / canary credentials to detect credential-stuffing attempts.

References

  1. NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-77004
  2. CWE-74: https://cwe.mitre.org/data/definitions/74.html — Improper Neutralization of Special Elements in Output Used by a Downstream Component
  3. CVSS Calculator: https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
  4. MITRE ATT&CK — T1190: https://attack.mitre.org/techniques/T1190/ — Exploit Public-Facing Application

Exploit and Threat Actor Evidence

  • The NVD description confirms: "The exploit has been published and may be used." — indicating public exploit code exists.
  • No known APT campaigns specifically targeting this CVE have been identified at the time of writing.
  • Given the device class (small business/home routers), exploitation is likely conducted by:
    • IoT botnet operators (Mirai variants) for DDoS recruitment.
    • Credential-stuffing / opportunistic attackers scanning for exposed management interfaces.
    • Local network attackers who obtain low-privilege credentials through other means.

CISA KEV

Not listed on CISA Known Exploited Vulnerabilities catalog at the time of this report. However, the public exploit availability increases the likelihood of inclusion in the future.


Report generated by Valtersit Threat Intelligence. This report is for defensive security purposes only. Authorized testing of systems requires explicit permission from system owners.

👁️ SHODAN DORKS (THREAT HUNTING)

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.

product:"Comfast"
title:"Comfast"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-77004/ · 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.