The popular rConfig network configuration management utility is affected by two critical remote code execution flaws that have yet to be patched.
rConfig is a completely open-source, network configuration management utility used to validate and manage network devices, including switches, routers, firewalls, and load-balancer.
The cyber security expert Mohammad Askar has discovered two critical remote code execution vulnerabilities in the rConfig utility, it also published proof-of-concept exploits for both.
One of the exploits could be exploited by a remote, unauthenticated attacker to compromise targeted servers, and connected network devices.
Currently, rConfig is being used to manage more than 3.3 million network devices, unfortunately the two RCE flaws affect all versions of the popular software.
The first vulnerability, tracked as CVE-2019-16662, resides in the ajaxServerSettingsChk.php, it can be exploited by a remote, unauthenticated attacker.
“As we can see in line #2 the scripts save a GET request called ‘rootUname’ and save it to ‘$rootUname’ variable, and in line #12 it concatenate the ‘$rootUname’ with some strings and save it to ‘rootTestCmd1’ variable in line #12 then pass it to exec function in line #13 and do the same for the rest of the lines.” reads a blog post published by Askar.
“So we just need to inject our command and escape the string on line #13 to get our command executed, and to do that we can use the following payload:” 1 ; your command #
The researchers wrote a simple python code to exploit this vulnerability.
The second RCE, tracked as CVE-2019-16663, resides in the search crud.php and it could be only exploited by an authenticated attacker.
The expert wrote a python code to exploit also this vulnerability:
An attacker could access the vulnerable files with a malformed GET parameter designed to execute malicious OS commands on the targeted server.
The researchers that goes online with the handle @sudo_sudoka
discovered that the second RCE vulnerability could also be also exploited by an unauthenticated attacker in rConfig versions prior to version 3.6.0.
“A few days ago, Askar disclosed his finding after 35 days waiting but no response from rConfig’s developers. In his blog post, he described and released PoC for two vulnerabilities: CVE-2019-16662, the pre-auth, and CVE-2019-16663, the post-auth remote code execution (RCE) in rConfig 3.9.2, the latest version at this time.” wrote the expert in a blog post.
“After reviewing rConfig’s source code, however, I found out that not only rConfig 3.9.2 has those vulnerabilities but also all versions of it. Furthermore, CVE-2019-16663, the post-auth RCE can be exploited without authentication for all versions before rConfig 3.6.0.”
Askar reported the two vulnerabilities to the rConfig maintainers on September 19, but he received no reply, so after 35 days he decided to release the exploits.
Administrators using rConfig are recommended to temporarily uninstall the software until the two issues will be fixes.