The RP-AC52 web interface does not sufficiently verify whether a valid request was intentionally provided by the user. An attacker can perform actions with the same permissions as a victim user, provided the victim has an active session and is induced to trigger the malicious request. CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') - CVE-2016-6558
A command injection vulnerability exists in apply.cgi on the RP-AC52 web interface specifically in the action_script parameter. The action_script parameter specifies a script to be executed if the action_mode parameter does not contain a valid state. If the input provided by action_script does not match one of the hard coded options, then it will be executed as the argument of either a system() or an eval() call allowing arbitrary commands to be executed.
The most recent version of the RP-AC52 firmware, version 220.127.116.11s, has been confirmed vulnerable by the researcher. Source code analysis would indicate that earlier versions are vulnerable as well.
Based on a source code analysis of firmware version 18.104.22.168q the following devices are also suspected to be vulnerable: EA-N66 RP-N12 RP-N14 RP-N53 RP-AC56 WMP-N12
The CVSS score below reflects CVE-2016-6557.
A remote, unauthenticated attacker may be able to trick an authenticated user into clicking a specially crafted link, resulting in settings modification, privilege escalation, or complete control of the system.
Apply an update
The vendor has released firmware updates for the RP-N12, RP-N12, RP-AC52, RP-N53, EA-N66, RP-AC56 devices to address the issues. The WMP-N12 will not be receiving an update.
If you are unable to apply an update, please consider the following workarounds:
Restrict access and use strong passwords
LAN hosts should not browse the Internet while the web management interface has an active session in a browser tab. As a general good security practice, only allow trusted hosts to connect to the LAN. Implement strong passwords for WiFi and for the web management interface. Strong passwords can help to prevent blind guessing attempts that would establish sessions for CSRF attacks.