rclone RC API Unauthenticated Remote Code Execution (CVE-2026-41179)
by PSSec (pssec-io) · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-41179
- Category
- web
- Affected product
- rclone (Remote Control / rcd HTTP API)
- Affected versions
- rclone 1.48.0 – 1.73.4 (fixed in 1.73.5)
- Disclosed
- 2026-07-05
- Patch status
- patched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-06 |
| Author / Researcher | PSSec (pssec-io) |
| CVE / Advisory | CVE-2026-41179 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 |
| Status | Weaponized |
| Tags | rclone, rce, unauthenticated, webdav, rc-api, command-injection, docker-lab |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | rclone (Remote Control / rcd HTTP API) |
| Versions Affected | rclone 1.48.0 – 1.73.4 (fixed in 1.73.5) |
| Language / Platform | Go backend, exploited via HTTP/curl; PoC lab runs in Docker |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
rclone’s built-in Remote Control (rcd) HTTP API exposes an /operations/fsinfo endpoint that accepts an attacker-controlled fs= connection-string parameter used to instantiate a storage backend. When the string selects the WebDAV backend, rclone recognizes an optional bearer_token_command parameter that is handed straight to exec.Command() without any sanitization. Since the RC API listens without authentication by default, any network client can reach this endpoint and cause rclone to execute an arbitrary OS command as the rclone process user. The PoC builds a vulnerable Docker image (rclone 1.69.3), drives the shell-download-chmod-execute sequence purely through crafted fs= values, and catches a root reverse shell from the container.
Vulnerability Details
Root Cause
rc.GetFs() parses the user-supplied fs= string and instantiates the requested backend; the WebDAV backend’s bearer_token_command option is passed unsanitized to exec.Command(), and the RC HTTP listener enforces no authentication by default.
Attack Vector
- Send an unauthenticated
POST /operations/fsinforequest withfs=:webdav,url='...',vendor=other,bearer_token_command='<curl command>'to download a payload script to/tmp. - Send a second request with a
bearer_token_commandthatchmod +x’s the downloaded script. - Send a third request whose
bearer_token_commandexecutes the script, which opens a reverse shell back to the attacker’s listener. - Catch the shell — the process runs as the rclone user (root in the default container image).
Impact
Full unauthenticated remote code execution on any host running an exposed rclone rcd RC API, typically yielding root or service-account level access.
Environment / Lab Setup
Target: rclone v1.69.3 running `rcd` with RC API on port 5572 (Dockerfile.rclone)
Attacker: curl, a reverse-shell listener (netcat or penelope), python3 http.server to host poc.sh
Proof of Concept
PoC Script
See
poc.sh,Dockerfile.rclone,patched.Dockerfile.rclone, andinstructions.txtin this folder.
| |
poc.sh is a one-line bash reverse shell payload that is downloaded, chmod +x’d, and executed on the target purely through the injected bearer_token_command parameter; instructions.txt walks through the full 10-step lab (build, run, listener, serve payload, three fsinfo POSTs, catch shell, then repeat against patched.Dockerfile.rclone to confirm the fix).
Detection & Indicators of Compromise
Signs of compromise:
- Unexplained outbound HTTP requests from the rclone host fetching scripts
- New setuid/executable files dropped in
/tmpshortly afterfsinforequests - rclone process spawning shell children it has no legitimate reason to spawn
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to rclone v1.73.5 or later, which enforces authentication on all RC endpoints by default |
| Interim mitigation | Start rcd with --rc-user/--rc-pass, restrict network access to the RC port (5572) via firewall, and never expose it to untrusted networks |
References
Notes
Mirrored from https://github.com/pssec-io/CVE-2026-41179 on 2026-07-05.
| |