# TP-Link - CVE-2024-5035

**TP-Link Archer C5400**<mark style="color:red;">**X**</mark>, prior to release `Archer C5400X(EU)_V1_1.1.7 Build 20240510`, is vulnerable to <mark style="color:red;">**remote code execution**</mark> through the `rftest` binary exposed on TCP port 8888, 8889 and 8890.

<figure><img src="/files/P0D6KoZ1oIhINgsmwhk7" alt=""><figcaption></figcaption></figure>

## Proof-of-Concept

While the network service is designed to only accept commands that start with "[wl](https://wiki.dd-wrt.com/wiki/index.php/Wl_command)" or "[nvram get](https://wiki.dd-wrt.com/wiki/index.php/Hardware#NVRAM)," ONEKEY found that the restriction could be trivially bypassed by injecting a command after shell meta-characters like ; , & , or, | (e.g., "wl;id;").

<figure><img src="/files/OmpmNsHeESlaiKrQcQSR" alt=""><figcaption></figcaption></figure>

I have tried to emulate similar TP-Link devices, such as **Archer C5400**, but have not been able to reproduce the exploit. [FirmAE](/notes/development/docker/firmae-emulate-firmware.md) does not support emulation of Archer C5400X.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://0xpthree.gitbook.io/notes/exploits-pocs/tp-link-cve-2024-5035.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
