Summary
Rclone's RC endpoint operations/fsinfo accepts attacker-controlled filesystem parameters without requiring authentication, allowing inline backend definitions to be instantiated by anyone who can reach the RC API.
When a WebDAV backend is defined this way, its bearer_token_command option is executed during initialization, enabling single-request unauthenticated local command execution on Rclone instances exposed without global HTTP authentication.
Affected context
This vulnerability affects Rclone deployments:
- Running versions 1.48.0 up to (but not including) 1.73.5
- With the RC (remote control) API enabled
- Where
operations/fsinfois reachable over HTTP/HTTPS - Where global HTTP authentication, reverse-proxy auth, or network-layer access controls do not fully restrict untrusted access
In these conditions, the fs parameter to operations/fsinfo can be supplied by an unauthenticated party and used to define a backend that executes local shell commands when initialized.
Exploit preconditions
- Attack surface: Rclone RC HTTP endpoint exposing
operations/fsinfo - Required access: Network reachability to the RC service from the attacker (e.g., over localhost, LAN, or internet)
- Authentication: No global RC authentication or equivalent protection in front of
operations/fsinfo - Trigger point: A single HTTP request to
operations/fsinfocontaining an inline backend definition in thefsparameter, targeting the WebDAV backend - Why exploitation is possible:
operations/fsinfowas not marked withAuthRequired: true, so it accepts unauthenticated requestsrc.GetFs(...)allows inline backend definitions, giving the caller control over backend configuration fields- The WebDAV backend executes
bearer_token_commandduring initialization, treating configuration data as a command to run on the host
Why this happens
The core issue is the combination of:
- An RC endpoint (
operations/fsinfo) exposed without authentication - A generic helper (
rc.GetFs(...)) that creates storage backends from attacker-supplied configuration - A backend option (
bearer_token_commandin the WebDAV backend) that executes local commands during initialization
This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because user-controlled configuration drives execution of OS-level commands.
From a design perspective, sensitive RC operations were not consistently protected with authentication (CWE-306: Missing Authentication for Critical Function), and configuration knobs that execute commands were reachable through a loosely controlled, externally exposed API. The system implicitly trusted RC callers and backend configuration fields, resulting in a command execution primitive available to unauthenticated users.
Potential impact
- Unauthenticated execution of arbitrary OS commands on the Rclone host
- Full compromise of the account under which Rclone runs, including file read/write and further lateral movement
- Exfiltration, modification, or deletion of data synchronized by Rclone
- Use of the Rclone host as a foothold for broader network compromise
- Deployment of malware, cryptominers, or other persistent backdoors on the affected machine
General mitigation guidance
Effective mitigation focuses on tightening trust boundaries around the RC API and eliminating command-executing configuration paths from unauthenticated or low-trust contexts:
- Enforce authentication on all RC endpoints that can influence backend configuration or runtime behavior, following the principle that remote-control capabilities default to authenticated-only access.
- Separate configuration from execution: avoid options that execute shell commands during backend initialization, or constrain them to offline, local-only configuration paths not reachable via network APIs.
- Harden backend initialization APIs: ensure that helper functions like
rc.GetFs(...)validate inputs against a strict schema, rejecting configuration keys that would cause side effects such as command execution. - Apply least privilege to the Rclone process: run Rclone under a dedicated, low-privilege account with minimal filesystem and network permissions, so that any compromise has a smaller blast radius.
- Restrict RC network exposure: bind RC to localhost by default, place it behind authenticated reverse proxies or VPNs, and apply firewall rules so only trusted management hosts can reach it.
How teams detect issues like this
Detection can combine code-level analysis with operational monitoring:
- Static analysis and code review:
- Flag RC handlers that are exposed without explicit authentication requirements, especially those dealing with filesystem or backend configuration.
- Search for configuration fields or backend options that invoke OS commands (e.g.,
*_commandfields) and verify they are never reachable from unauthenticated or loosely authenticated APIs. - Review uses of generic factory helpers (like
GetFs-style functions) that accept arbitrary user-supplied identifiers and configuration maps, ensuring they are properly constrained. - Configuration and policy enforcement:
- Enforce internal policies that RC ports must not be internet-exposed and must sit behind authentication or VPNs.
- Use infrastructure-as-code or configuration scanners to identify Rclone deployments with RC enabled and no authentication configured.
- Runtime monitoring:
- Monitor RC logs for unusual or repeated calls to
operations/fsinfo, especially from unexpected source IPs or containing inline backend definitions. - Use host-level telemetry (e.g., process creation monitoring) to detect unexpected shell invocation patterns tied to the Rclone process.
Automated review tools and CI checks can be configured to flag newly introduced RC endpoints lacking explicit authentication and to detect risky command-executing configuration options exposed through public APIs.

