Cloudanix VulnDB

CVE-2024-12856

High · 7.2

CVSS

7.2

EPSS

84.1%

Published

Dec 27, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Attend

Affected routers can be taken over through their web management page, especially if the original default password was never changed.

Chainable
Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Low
Impact
Remote Code Execution
Component
Firmware
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

Four-Faith F3x24 and F3x36 routers running at least firmware version 2.0 contain an OS command injection flaw in the HTTP management interface. The vulnerable code path is reached through apply.cgi when modifying system time settings. An authenticated remote user can inject shell metacharacters or commands into request parameters, causing the router OS to execute attacker-controlled commands with the privileges of the web management process, which may be highly privileged on embedded devices. Because the affected firmware also includes default credentials, devices where those credentials have not been changed may be exploitable remotely without any prior legitimate access.

Why it matters to the business

Successful exploitation can give an attacker control over edge network routers, allowing traffic interception, network pivoting, botnet enrollment, service disruption, configuration theft, or persistent unauthorized access. The high EPSS score indicates a meaningful likelihood of exploitation activity in the wild even though the issue is not currently listed in CISA KEV. Internet-facing routers, devices still using default credentials, and routers deployed in operational technology, remote sites, or unmanaged branch networks should be treated as high-risk because compromise can affect connectivity and provide an attacker a foothold into downstream networks.

How an attack unfolds

An attacker first identifies an exposed Four-Faith F3x24 or F3x36 router management interface, typically by scanning for reachable HTTP services and fingerprinting the device or firmware. If the attacker has valid credentials, or if the router still uses factory-default credentials, they authenticate to the web interface. The attacker then submits a crafted request to apply.cgi while changing the system time configuration, embedding shell control characters and OS commands into a vulnerable input field. The router-side CGI handler passes the unsanitized value to the operating system, causing the injected command to execute. From there, the attacker may download and run malware, add persistence, alter configuration, disable logging, exfiltrate device configuration, proxy traffic, or use the router as a launch point against internal systems.

How to fix it

Upgrade affected Four-Faith F3x24 and F3x36 routers to a vendor-provided firmware version that fixes the command injection issue as soon as available. No fixed versions were provided in the input, so security teams should check Four-Faith advisories, support portals, and device-specific firmware release notes before deployment. If an upgrade is not immediately available, remove internet exposure for the web management interface, restrict management access to a dedicated administrative network or VPN, block untrusted access to HTTP/HTTPS management ports at firewalls, and ensure factory-default credentials have been changed to unique strong passwords. Disable remote management if not required. Rotate any credentials stored on or used by the router if compromise is suspected. Where practical, replace unsupported or unpatchable devices with supported models.

How to confirm the fix worked

Confirm exposure by inventorying Four-Faith F3x24 and F3x36 routers and verifying firmware versions through the management interface, device CLI, configuration export, or asset management tooling. Validate that management interfaces are not reachable from the public internet or untrusted networks. Confirm that default credentials no longer work and that unique administrative passwords are configured. After applying firmware updates or mitigations, retest that only approved management sources can reach the device and that apply.cgi cannot be abused to execute injected shell commands. Validation should be performed using authorized testing only, preferably in a lab or maintenance window, because malformed requests to embedded routers can disrupt service.

Typical attack path

  1. Scan the internet or target network for exposed Four-Faith router HTTP management interfaces.
  2. Fingerprint the device model or firmware version to identify likely F3x24 or F3x36 devices running vulnerable firmware.
  3. Attempt login using known, reused, weak, or factory-default credentials.
  4. Send a crafted HTTP request to apply.cgi through the system time modification workflow with injected shell commands in a vulnerable parameter.
  5. Execute reconnaissance commands on the router, such as reading configuration, network interfaces, routes, users, or running processes.
  6. Download and execute a payload using available utilities such as wget, curl, tftp, ftpget, or busybox applets.
  7. Establish persistence or recurring execution where supported by the firmware.
  8. Use the compromised router to proxy traffic, disrupt service, join a botnet, or pivot toward reachable internal network assets.

How to detect it

Investigate whether exploitation has already occurred by reviewing router web-management access logs, reverse proxy logs if present, firewall logs, VPN logs, NetFlow, DNS logs, and EDR/NDR telemetry that can observe traffic to or from the router. Focus on HTTP requests to apply.cgi associated with system time changes, especially POST requests containing shell metacharacters such as semicolons, pipes, backticks, dollar-parentheses, URL-encoded equivalents, or command names commonly used to download and run payloads. Review authentication logs for successful logins from unusual IP addresses, repeated attempts against the management interface, or use of factory-default credentials where logging records usernames. On the device, look for unexpected configuration changes, new startup or scheduled commands, unknown processes, unusual binaries in writable temporary directories, modified DNS or routing settings, unexplained firewall/NAT changes, and outbound connections to unfamiliar hosts. Because embedded routers often have limited logging and attackers may clear logs, absence of logs should not be treated as proof of non-exploitation. Correlate suspicious management access with outbound connections shortly afterward, particularly downloads over HTTP, FTP, TFTP, or connections to known botnet infrastructure.

  • /apply.cgi
  • apply.cgi
  • POST /apply.cgi
  • GET /apply.cgi
  • %3B
  • %7C
  • %60
  • %24%28
  • ;wget
  • ; curl
  • ;curl
  • |wget
  • | curl
  • |curl
  • `wget
  • `curl
  • $(wget
  • $(curl
  • busybox wget
  • busybox tftp
  • chmod +x
  • /tmp/
  • /var/tmp/
  • /dev/shm/
  • sh -c
  • /bin/sh
  • /bin/busybox
  • tftp -g
  • ftpget
  • nc -e
  • telnetd
  • dropbear

What your security team should do

  • Immediately identify all Four-Faith F3x24 and F3x36 routers, prioritizing internet-facing and remotely managed devices.
  • Change any factory-default or shared credentials and rotate administrative passwords on all affected routers.
  • Restrict router management interfaces to trusted administrative networks or VPN-only access; block public access to HTTP/HTTPS management services.
  • Check vendor support channels for fixed firmware and plan emergency upgrades or device replacement where no supported fixed version exists.
  • Review web access logs, device logs, firewall logs, and network telemetry for requests to apply.cgi containing shell metacharacters or command-execution utilities.
  • Hunt for signs of embedded-device malware activity, including outbound downloads, unusual DNS lookups, unexpected outbound connections, and new recurring processes or scripts.
  • If exploitation is suspected, isolate the router, preserve logs and configuration where possible, reflash trusted firmware, reset credentials, and review adjacent network systems for pivoting.
  • Add monitoring rules for suspicious apply.cgi requests and for management access attempts using default, weak, or reused credentials.

The record

The Four-Faith router models F3x24 and F3x36 are affected by an operating system (OS) command injection vulnerability. At least firmware version 2.0 allows authenticated and remote attackers to execute arbitrary OS commands over HTTP when modifying the system time via apply.cgi. Additionally, this firmware version has default credentials which, if not changed, would effectively change this vulnerability into an unauthenticated and remote OS command execution issue.

Affected packages

Ecosystem Package Introduced Fixed