CVE-2021-35400: Unauthenticated Command Injection in Prolink PRC2402M mesh.cgi
CVE-2021-35400 is an unauthenticated OS command injection vulnerability in the Prolink PRC2402M router, observed on firmware version 20190909. The flaw is in the /cgi-bin/mesh.cgi CGI handler, specifically the code path reached when the HTTP query parameter page=extender is supplied. In get_extender_page, user-controlled input from the key parameter is incorporated into a shell command without proper validation or neutralization. The code reads QUERY_STRING, extracts parameters via web_get, retrieves lan_ipaddr from NVRAM, concatenates lan_ipaddr with the attacker-controlled key value, formats a command of the form echo -n '%s' | md5sum using sprintf, and executes it via popen. Because shell metacharacters in key are not sanitized, an attacker can break out of the intended command context and inject arbitrary shell commands. The injected commands execute in the security context of root.
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 as root on the affected router. Because the vulnerable endpoint is reachable without authentication, a remote attacker can fully compromise the device, including modifying configuration, executing system utilities, writing files, and potentially establishing persistence or using the router as a pivot point. The issue is WAN-reachable according to the provided context for unauthenticated Prolink PRC2402M command injection flaws.
Mitigation
If you can’t patch tonight, do this now.
Until patched firmware is deployed, restrict access to the router’s web management interface, especially from untrusted networks and the WAN; disable remote administration if not required; place management behind trusted network boundaries; and monitor for suspicious requests to /cgi-bin/mesh.cgi, particularly GET requests with page=extender and anomalous key values containing shell metacharacters. If compromise is suspected, rotate credentials, review configuration integrity, and reimage or replace the device as appropriate.
Remediation
Patch, then assume compromise.
Apply the vendor fix released by Prolink after the June 2021 disclosure process. Remediation requires correcting mesh.cgi so that attacker-controlled parameters are never passed to a shell interpreter unsafely. Specifically, eliminate shell invocation for MD5 generation where possible, or strictly validate and neutralize all user-controlled input before use; replace unsafe command construction patterns such as sprintf plus popen with safer APIs that do not invoke a shell; and ensure the vulnerable page=extender code path in get_extender_page no longer permits command injection through the key parameter.
Exploits
No public exploits tracked yet. Mallory keeps watching.
References
Frequently asked questions
- Is CVE-2021-35400 exploited in the wild?
- As of Apr 11, 2026, Mallory has no reports of CVE-2021-35400 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2021-35400?
- As of Apr 11, 2026, Mallory has found no public exploit for CVE-2021-35400.
- Is there a patch for CVE-2021-35400?
- Apply the vendor fix released by Prolink after the June 2021 disclosure process. Remediation requires correcting mesh.cgi so that attacker-controlled parameters are never passed to a shell interpreter unsafely.
Recent activity
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.