/

CVE-2026-121930

Severity:

CRITICAL RISK

(9.1)

Command Injection (CWE-78) in Linksys WRT54GL CGI

CVE-2026-121930

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Ping Diagnostic function in Linksys WRT54GL firmware 4.30.18 is reported to pass the ping_ip argument to an operating-system command in apply.cgi unsafely. A remote attacker who can reach the affected handler may be able to execute OS commands; the product is no longer supported, which can make remediation more difficult.

Affected context

The reported weakness is in the Ping Diagnostic functionality of the Linksys WRT54GL running firmware 4.30.18. It involves the system function in apply.cgi and the handling of the ping_ip argument. Risk depends on whether the diagnostic handler is reachable and on the device's access controls. The affected product is no longer supported by its maintainer.

Exploit preconditions

  • Attack surface: The device's web interface, specifically the Ping Diagnostic handler in apply.cgi
  • Required access: Network access to the handler; whether authentication is required is not specified in the vulnerability description
  • Trigger point: Processing of the ping_ip argument
  • Why exploitation is possible: The argument is reported to reach an operating-system command through system without adequate protection against command injection

Why this happens

The reported bug is an unsafe boundary between application input and operating-system command execution. Passing a value such as ping_ip into a shell command without safe argument handling or strict validation can allow input to be interpreted as command syntax rather than data. This is OS command injection, covered by CWE-78 and related to the broader command injection weakness CWE-77.

Potential impact

  • An attacker may execute commands with the privileges of the affected service
  • Device settings or availability could be compromised
  • Network traffic passing through or managed by the device could be exposed or disrupted
  • The device could potentially be used as a foothold for further activity on connected networks

General mitigation guidance

Defensive patterns focus on avoiding shell interpretation and reducing exposure:

  • Prefer APIs that invoke the required program directly with distinct arguments rather than constructing shell commands
  • Treat diagnostic input as untrusted and validate it against a narrow, explicit format, such as an approved IP address representation
  • Apply least privilege to processes that run diagnostics and restrict access to management interfaces
  • Isolate device management from untrusted networks and disable diagnostic functionality when it is not needed
  • Because the affected product is unsupported, consider replacing unsupported devices with maintained alternatives and apply organizational lifecycle controls

How teams detect issues like this

  • Review code and firmware components for shell execution APIs such as system that receive request parameters
  • Use static analysis rules to flag user-controlled data flowing into command construction or shell execution
  • Review management-interface access logs for unusual requests to Ping Diagnostic functionality
  • Enforce policies that prohibit shell-based command construction from network input and require allowlisted validation for diagnostic parameters
  • Automated code review tools may help identify risky input-to-command data flows

Sources

SourceLink
github.comgithub.com/Zimo-666/WRT54GL-cves/tree/main/CVE-TBD-ping-ip-command-injection
vuldb.comvuldb.com/cve/CVE-2026-121930
vuldb.comvuldb.com/submit/1024098
vuldb.comvuldb.com/vuln/431042
vuldb.comvuldb.com/vuln/431042/cti
linksys.comlinksys.com/

Frequently asked

questions

The report says the attack can be initiated remotely through the Ping Diagnostic functionality. The handler must be reachable, but the description does not specify whether authentication is required.

Network access to the affected web handler is the stated general prerequisite. The exact access controls and authentication requirements depend on the device's configuration.

Avoid passing request data through a shell. Use direct process invocation with separate arguments and strictly validate the input against the expected format.

Minimize exposed management services, enforce allowlisted input validation, run diagnostic processes with limited privileges, and review input-to-command flows in code and security checks.

Find out what's already
exploitable in your codebase.