TP-Link Tapo C260 Unauthenticated-to-Root RCE Chain — CVE-2026-0651
by l0lsec (chain implementation); vulnerability research by Eugene Lim / Spaceraccoon · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-0651 (chained with CVE-2026-0652, CVE-2026-0653)
- Category
- network
- Affected product
- TP-Link Tapo C260 IP camera (pre-patch firmware, shared /bin/main omnibus binary across models)
- Affected versions
- Tapo C260 pre-patch firmware; potentially other Tapo models sharing the same binary
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-03 |
| Author / Researcher | l0lsec (chain implementation); vulnerability research by Eugene Lim / Spaceraccoon |
| CVE / Advisory | CVE-2026-0651 (chained with CVE-2026-0652, CVE-2026-0653) |
| Category | network |
| Severity | Critical |
| CVSS Score | Not specified in source |
| Status | Weaponized |
| Tags | iot, ip-camera, tp-link, tapo, path-traversal, command-injection, privilege-escalation, exploit-chain |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | TP-Link Tapo C260 IP camera (pre-patch firmware, shared /bin/main omnibus binary across models) |
| Versions Affected | Tapo C260 pre-patch firmware; potentially other Tapo models sharing the same binary |
| Language / Platform | Python 3.8+, targeting embedded Linux camera firmware over HTTP/cloud API |
| Authentication Required | Local-only (guest-level credentials sufficient for full chain) |
| Network Access Required | Yes (local network for LFD, or TP-Link cloud API with valid cloud auth token for full RCE) |
Summary
This PoC chains three vulnerabilities in the TP-Link Tapo C260 camera to go from unauthenticated (or guest-level) access to root command execution. First, a path traversal flaw in the HTTP GET handler allows arbitrary local file disclosure. Second, a guest-level user can abuse JSON key manipulation in the cloud API to write attacker-controlled data into arbitrary configuration paths on the device, including the dev_name field. Third, the device’s set_region_code_handle reads that dev_name value and passes it unsanitized into a popen() call, so a poisoned dev_name containing shell metacharacters results in command injection when the region-code handler is triggered. The exploit.py script automates poisoning the config and triggering the handler to obtain a reverse shell or arbitrary command execution.
Vulnerability Details
Root Cause
Unsanitized user-controlled configuration value (dev_name) is interpolated directly into a popen() call inside the set_region_code_handle firmware routine, combined with a JSON key manipulation flaw that lets guest-level users write to that config path, and a separate path traversal bug in the GET handler for reconnaissance/file read.
Attack Vector
- Use the Local File Disclosure primitive (
lfd.py) against/%2e%2e%2f-style path traversal to read device configuration and confirm target state. - Send a crafted
setLedStatus-style request that abuses JSON key manipulation to poison thetp_manage/info/dev_nameconfig value with a shell metacharacter payload. - Trigger the
set_region_codecloud API call; the device handler reads the poisoneddev_nameand passes it unsanitized topopen(). - Receive command execution results via callback or an established reverse shell.
Impact
Full unauthenticated-to-root remote code execution on the camera, allowing attackers to view/exfiltrate video feeds, pivot into the local network, or achieve persistent device compromise.
Environment / Lab Setup
Target: TP-Link Tapo C260 IP camera (pre-patch firmware), reachable over local network and/or TP-Link IoT cloud
Attacker: Python 3.8+ with requests; valid TP-Link cloud auth token and device ID for the full cloud-based chain
Proof of Concept
PoC Script
See
lfd.pyandexploit.pyin this folder.
| |
lfd.py performs standalone local file disclosure via the path traversal bug. exploit.py runs the full kill chain — poisoning dev_name via the cloud API, triggering the region-code handler, and returning either a reverse shell, a one-shot callback ping, or output from an arbitrary custom command.
Detection & Indicators of Compromise
Signs of compromise:
- Outbound reverse-shell connections or unexpected callback HTTP requests originating from camera IPs
- Configuration values (
dev_name) containing non-printable or shell-special characters - Unexpected process spawning (
popen/sh -c) on camera firmware correlating withset_region_codecalls
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor TP-Link security advisories for firmware updates addressing this chain |
| Interim mitigation | Restrict camera access to trusted networks/VLANs, disable cloud remote access where not required, and monitor for firmware update availability from TP-Link |
References
Notes
Mirrored from https://github.com/l0lsec/tapo-c260-rce on 2026-07-05.
| |