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

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.

Register

Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.

Register

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Identity & Access

Zero trust is not a replacement for identity and access management (IAM), but is the extension of IAM principles from people to everyone and...

Vulnerabilities

Apple has released updates for macOS, iOS and Safari and they all include a WebKit patch for a zero-day vulnerability tracked as CVE-2023-23529.

Network Security

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

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.

Cyberwarfare

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

Cloud Security

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