Summary
A critical vulnerability in Rclone's rcd HTTP API allows unauthenticated GET and HEAD requests to trigger backend initialization with attacker-controlled remote configuration.
Because inline backend options can execute local commands during initialization, a single crafted request can run arbitrary commands as the rclone process user whenever rcd --rc-serve is exposed.
Affected context
This vulnerability affects environments where the rclone rcd --rc-serve API is exposed over HTTP and reachable by untrusted clients.
It is relevant when:
- The rcd service listens on interfaces accessible to attackers (e.g., public network, shared internal network, container overlay)
- Inline remote configuration is enabled and processed during backend initialization
- The rclone process user has meaningful local privileges (filesystem, OS commands, or access to cloud credentials)
Exploit preconditions
- Attack surface: HTTP endpoint provided by
rclone rcd --rc-serve - Required access: Network reachability to the rcd service; no authentication required for the vulnerable paths
- Trigger point: A single crafted GET or HEAD request to a URL of the form
/[remote:path]/object - Why exploitation is possible: The
remotevalue from the URL is parsed as inline configuration and passed directly into backend initialization, where certain backend options can execute local commands without prior authentication or robust validation
Why this happens
The core issue is the combination of unauthenticated access to sensitive API paths and overly powerful configuration-driven behavior during backend initialization.
The rcd handler accepts GET and HEAD requests that embed a remote definition in the URL, treating it as trusted inline configuration.
Backend options provided in this configuration can trigger command execution as part of initialization, mapping to:
- CWE-306: Missing Authentication for Critical Function, because an unauthenticated request can reach a code path that performs high-privilege operations.
- CWE-78: Improper Neutralization of Special Elements used in an OS Command, because user-controlled configuration ultimately influences OS-level command execution without adequate sanitization or restriction.
Potential impact
- An attacker can execute arbitrary OS commands as the rclone process user
- Compromise of the host system or container running rclone
- Theft or manipulation of data accessible via rclone (local files or cloud storage)
- Installation of persistent backdoors or pivoting to other systems
- Abuse of stored credentials or access tokens managed by rclone
General mitigation guidance
Effective mitigation focuses on reducing both the exposure of the rcd API and the power of configuration-driven command execution.
Recommended patterns include:
- Treating remote administration endpoints as highly privileged, requiring strong authentication and authorization before any request is processed
- Avoiding designs where inline configuration can directly trigger OS commands during initialization; isolate configuration parsing from command execution and restrict allowed options
- Implementing strict input validation and whitelisting for backend options, ensuring that fields cannot be used to construct arbitrary commands or shell arguments
- Running rclone under least-privilege accounts and isolating it with process- or container-level sandboxing, so that any compromise has minimal blast radius
- Restricting network exposure of rcd to loopback or tightly controlled administrative networks, and using transport-level protections such as TLS
How teams detect issues like this
Detection can combine code-centric and operational approaches:
- Static analysis and manual code review to identify HTTP handlers that:
- Accept unauthenticated requests
- Pass user-controlled parameters into backend initialization or command invocation paths
- Rule-based scanning to flag any interpolation of request data into configuration structures that can affect OS commands or external processes
- Logging and monitoring of rcd access patterns, including:
- Requests to
/[remote:path]/objectstyle endpoints - Unusual backend initialization events or command executions originating from rclone
- Security policies that enforce authentication on administrative APIs and prohibit configurations allowing direct command execution, supported by automated CI checks or configuration linters

