/

CVE-2026-41179

Severity:

CRITICAL RISK

(9.8)

Command Injection in Rclone

CVE-2026-41179

Modified

Vulnerability type

Category:

Command Injection

CWE:

CWE-78, CWE-306, CWE-94

Impact:

Unauthenticated Remote Code Execution on the Rclone host

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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/fsinfo is 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/fsinfo containing an inline backend definition in the fs parameter, targeting the WebDAV backend
  • Why exploitation is possible:
  • operations/fsinfo was not marked with AuthRequired: true, so it accepts unauthenticated requests
  • rc.GetFs(...) allows inline backend definitions, giving the caller control over backend configuration fields
  • The WebDAV backend executes bearer_token_command during 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_command in 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., *_command fields) 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.

Sources

SourceLink
github.comgithub.com/rclone/rclone/blob/bf55d5e6d37fd86164a87782191f9e1ffcaafa82/backend/webdav/webdav.go
github.comgithub.com/rclone/rclone/blob/bf55d5e6d37fd86164a87782191f9e1ffcaafa82/fs/operations/rc.go
github.comgithub.com/rclone/rclone/blob/bf55d5e6d37fd86164a87782191f9e1ffcaafa82/fs/rc/cache.go
github.comgithub.com/rclone/rclone/commit/2a9e952b38e03a96bf40c9eb6e8e22199865ee3b
github.comgithub.com/rclone/rclone/releases/tag/v1.73.5
github.comgithub.com/rclone/rclone/security/advisories/GHSA-jfwf-28xr-xw6q
rclone.orgrclone.org/changelog/#v1-73-5-2026-04-19
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-41179
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2460988
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41179.json

Frequently asked

questions

Yes. If the RC API (with the operations/fsinfo endpoint) is reachable from the attacker's network location and is not protected by authentication or strict access controls, the vulnerability can be exploited via a single HTTP request.

No credentials are required when operations/fsinfo is exposed without global RC authentication or equivalent protection. The attacker only needs network access to the RC endpoint and the ability to send crafted requests.

The safest general pattern is to require strong authentication for all remote-control and configuration endpoints, and to ensure that no unauthenticated or low-trust interfaces can trigger OS command execution, either directly or via configuration options. Additionally, avoid designing options that execute shell commands during normal initialization flows, or tightly sandbox them in trusted-only contexts.

Apply an "authenticated-by-default" policy for any administrative or RC interface, treat configuration received over the network as untrusted input with strictly validated schemas, and forbid command-executing configuration parameters from being set through external APIs. Complement this with defense-in-depth—least-privilege process accounts, restricted network exposure, security-focused code reviews, and automated checks for command execution sinks and missing authentication on sensitive endpoints.

Find out what's already
exploitable in your codebase.