Security Experts:

Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Network Security

0-Day in TP-Link SR20 Routers Allows Command Execution

An unpatched vulnerability in the TP-Link SR20 smart hub and router can be exploited to achieve arbitrary command execution, a security researcher has discovered. 

An unpatched vulnerability in the TP-Link SR20 smart hub and router can be exploited to achieve arbitrary command execution, a security researcher has discovered. 

Likely impacting other TP-Link devices as well, the issue was found in the “TDDP” (TP-Link Device Debug Protocol) process, which TP-Link routers frequently run as root. Version 2 of the protocol requires admin password on the router, but version 1 is unauthenticated. 

What Google security researcher Matthew Garrett discovered was that the router still exposes some version 1 commands, including one for configuration validation. 

“You send it a filename, a semicolon and then an argument,” the researcher explains on Twitter. 

“The router then connects back to the requesting machine over TFTP, requests the filename via TFTP, imports it into a LUA interpreter and passes the argument to the config_test() function in the file it just imported,” Garrett also notes. 

With config_test() being provided by the file downloaded from the remote machine, arbitrary code execution is possible in the interpreter. This also includes an os.execute method, which runs commands on the host, the researcher says

Since the interpreter is running as root, an attacker could leverage the os.execute() method to execute arbitrary code with root privileges, the researcher says. 

TDDP is listening on all interfaces but, because the default firewall rules on the SR20 routers block WAN access, the vulnerability can only be exploited via the local network, Garrett explains.

The security researcher discovered the vulnerability last year and reported it to TP-Link in December, but received no reply from the company, so he decided to make the vulnerability public. He also published proof-of-concept code exploiting the bug. 

“Stop shipping debug daemons on production firmware and if you’re going to have a webform to submit security issues then have someone actually respond to it,” Garrett pointed out on Twitter. 

Related: TP-Link Patches Remote Code Execution Flaws in SOHO Router

Related: Cisco Improperly Patched Exploited Router Vulnerabilities

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Expert Insights

Related Content

Network Security

NSA publishes guidance to help system administrators identify and mitigate cyber risks associated with transitioning to IPv6.

Cyberwarfare

Websites of German airports, administration bodies and banks were hit by DDoS attacks attributed to Russian hacker group Killnet

Mobile & Wireless

Technical details published for an Arm Mali GPU flaw leading to arbitrary kernel code execution and root on Pixel 6.

Mobile & Wireless

Apple rolled out iOS 16.3 and macOS Ventura 13.2 to cover serious security vulnerabilities.

Cloud Security

VMware vRealize Log Insight vulnerability allows an unauthenticated attacker to take full control of a target system.

Identity & Access

Hackers rarely hack in anymore. They log in using stolen, weak, default, or otherwise compromised credentials. That’s why it’s so critical to break the...

Mobile & Wireless

Apple’s iOS 12.5.7 update patches CVE-2022-42856, an actively exploited vulnerability, in old iPhones and iPads.

Vulnerabilities

Security researchers have observed an uptick in attacks targeting CVE-2021-35394, an RCE vulnerability in Realtek Jungle SDK.