CVE-2021-35406: Unauthenticated command injection in Prolink PRC2402M qos.cgi
CVE-2021-35406 is a command injection vulnerability in the Prolink PRC2402M router, tested on firmware version 20190909. Based on the provided supporting content, the flaw is in the /cgi-bin/qos.cgi CGI handler. When the page parameter is set to qos, the qos_settings routine processes attacker-controlled parameters including qos_dat and qos_bandwidth, uses sprintf to embed them into shell command strings, and executes the resulting command via do_system, a wrapper around system, without sufficient input validation or sanitization. This allows arbitrary shell metacharacters or command substitution to be injected through HTTP POST parameters. The provided proof of concept uses a crafted POST request to /cgi-bin/qos.cgi with page=qos and a malicious qos_dat value such as $(echo gg>/tmp/gg) to demonstrate code execution.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows arbitrary command execution on the affected router as the root user. An attacker can fully compromise the device, modify configuration, access or alter traffic-handling behavior, install persistence, pivot into adjacent networks, or disrupt router operation.
Mitigation
If you can’t patch tonight, do this now.
Until patched firmware is deployed, restrict access to the router web interface, especially from untrusted networks and WAN exposure. Disable remote administration if not required, place the management interface behind trusted network boundaries, and use firewall rules or ACLs to limit access to HTTP management endpoints such as /cgi-bin/qos.cgi. Monitor for suspicious POST requests targeting qos.cgi with shell metacharacters or command-substitution syntax in qos_dat or qos_bandwidth parameters.
Remediation
Patch, then assume compromise.
Apply the vendor fix released by Prolink for CVE-2021-35406. The supporting content indicates Prolink fixed the issue on 2021-06-13 after an initial patch and subsequent bypass. If firmware updates are available, upgrade the PRC2402M to a version containing the final fix. At the code level, remediation requires eliminating shell command construction with unsanitized user input, avoiding system/do_system for parameterized operations where possible, and enforcing strict server-side validation and escaping of all CGI parameters used in command contexts.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2021-35406 exploited in the wild?
- As of Apr 11, 2026, Mallory has no reports of CVE-2021-35406 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2021-35406?
- As of Apr 11, 2026, Mallory has found no public exploit for CVE-2021-35406.
- Is there a patch for CVE-2021-35406?
- Apply the vendor fix released by Prolink for CVE-2021-35406. The supporting content indicates Prolink fixed the issue on 2021-06-13 after an initial patch and subsequent bypass.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.