Aug 6, 2026·11 min read·1 visit
Uncaught nil-pointer dereference in rclone's WebDAV backend causes immediate process-wide crashes (denial of service) when a TUS upload encounters a pre-response transport or network failure.
A critical process-fatal NULL pointer dereference vulnerability exists in the WebDAV backend of rclone (when configured with ownCloud Infinite Scale TUS uploads). During transport failures, a nil HTTP response pointer is dereferenced directly without validation, leading to an unhandled Go runtime panic that terminates the entire rclone daemon. This vulnerability was resolved in rclone version 1.75.0.
Rclone is an open-source command-line program used to manage and synchronize files on cloud storage. It supports a wide variety of backends, including WebDAV, which is commonly deployed alongside ownCloud Infinite Scale instances. When utilizing the ownCloud Infinite Scale WebDAV backend, rclone supports the TUS (Resumable Upload Protocol) upload standard to handle large files and resume interrupted transfers.
The vulnerability resides within the TUS upload client implementation inside rclone's WebDAV backend package. Specifically, a critical flaw exists in how the application processes pre-response network failures and transport-level exceptions during the initiation of a TUS upload. When a network transaction fails before an HTTP response is returned, the Go standard library client yields a null pointer for the response object alongside a non-nil error.
The application failed to implement a validation routine to confirm the existence of the response object before accessing its structure fields. Consequently, when a connection reset, timeout, proxy failure, or DNS lookup failure occurs during a TUS upload initiation, rclone dereferences a nil pointer. This error propagates as an unrecovered runtime panic, immediately terminating the rclone process and causing a complete denial of service for all active operations.
The ownCloud Infinite Scale platform uses the TUS open protocol for resumable file uploads to improve synchronization stability over high-latency connections. Rclone integrates this capability inside its WebDAV backend to allow users to upload large datasets with automatic checkpointing and chunking. This architectural integration introduces a specific attack surface since rclone must dynamically query endpoints and parse returned resource locators.
During standard TUS execution, the client initiates a session by sending an HTTP POST request to the server, which then responds with a '201 Created' status containing a 'Location' header. The client subsequently utilizes this unique location URI to push file fragments in sequence. This multi-step handshake relies heavily on the transport layer remaining active, making error handling in the early phases critical for process survivability.
The vulnerability is classified under CWE-476 (NULL Pointer Dereference) and CWE-248 (Uncaught Exception). In Go, the net/http package specifies that when a client executes a request via client.Do(req), a network or protocol error occurring prior to receiving HTTP headers will return a nil pointer for the *http.Response and an active error value. Standard defensive programming in Go requires validating both values before accessing any field belonging to the response structure.
In vulnerable versions of rclone (v1.74.0 and below), the implementation in backend/webdav/tus.go failed to perform this check. When triggering a TUS upload, rclone invokes the getTusLocationOrRetry method to inspect the HTTP response returned by the target ownCloud Infinite Scale server. The function immediately executed a switch statement on resp.StatusCode before evaluating whether resp was null or if a transport error had been returned by the HTTP client.
Because Go does not natively intercept nil pointer dereferences with soft errors, the instruction resp.StatusCode triggers an invalid memory address violation. This results in an immediate, fatal runtime panic. If this panic occurs within a standard background goroutine lacking an active recover() handler, such as the asynchronous write loops used in rclone virtual file system (VFS) mounts, the Go runtime forcefully terminates the entire operating system process.
In the Go programming language, structs are accessed via pointers, and dereferencing a pointer that points to nil triggers a runtime panic rather than an OS-level segmentation fault. Unlike languages with try-catch-finally constructs that allow global rescue operations, Go's panic mechanism requires active deferred recovery handlers within the execution scope of the active goroutine. If a goroutine fails to capture a panic using the recover() function, the runtime immediately terminates the entire process group.
The implementation inside backend/webdav/tus.go lacked any deferred recovery handlers inside the TUS upload functions. The function getTusLocationOrRetry was called directly from the main upload loop, which meant any panic originating inside this call would directly propagate to the root execution context of the rclone engine. This design flaw transformed a standard network-level exception into a catastrophic process failure.
The vulnerable code path is situated in backend/webdav/tus.go within the getTusLocationOrRetry helper method. The function is designed to handle the initial handshake responses during TUS-based file creation.
In the vulnerable code block, the logic immediately attempts to switch on resp.StatusCode as its first execution block:
func (f *Fs) getTusLocationOrRetry(ctx context.Context, resp *http.Response, err error) (bool, string, error) {
// VULNERABILITY: Directly dereferencing 'resp' without verification.
// If a transport error occurred, 'resp' is nil and this line crashes the process.
switch resp.StatusCode {
case 201:
location := resp.Header.Get("Location")
return false, location, nil
case 412:
return false, "", ErrVersionMismatch
case 413:
return false, "", ErrLargeUpload
}
retry, err := f.shouldRetry(ctx, resp, err)
// ...If a transport failure occurs, the program bypasses the standard safety boundaries. The function expects resp to hold a valid pointer to an http.Response instance. However, when the network layer rejects the TCP connection, resp contains nil, leading to the segmentation violation on line 47.
The patch introduced in version 1.75.0 mitigates this vulnerability by nesting the switch-case statement inside a defensive validation block. This ensures that field access is only attempted when resp is non-nil:
func (f *Fs) getTusLocationOrRetry(ctx context.Context, resp *http.Response, err error) (bool, string, error) {
// FIXED: Response validation prevents dereferencing on null objects
if resp != nil {
switch resp.StatusCode {
case 201:
location := resp.Header.Get("Location")
return false, location, nil
case 412:
return false, "", ErrVersionMismatch
case 413:
return false, "", ErrLargeUpload
}
}
// When 'resp' is nil, the code safely flows to the standard retry mechanism.
// The shouldRetry helper is designed to process transport errors safely.
retry, err := f.shouldRetry(ctx, resp, err)
// ...The shouldRetry method called at the end of the vulnerable block is a built-in rclone helper designed to evaluate errors and determine if a transfer should be retried based on configuration parameters. Critically, shouldRetry contains explicit logic to handle both nil and non-nil response pointers. Had the execution reached this helper method instead of panicking on line 47, rclone would have safely logged the transport error, applied the backoff algorithm, and cleanly returned an error to the caller thread.
The patch's placement of the validation check (if resp != nil) ensures that the function behaves exactly as intended when transport failures occur. By bypassing the switch block, the nil response pointer and the non-nil transport error are passed straight to shouldRetry. This enables rclone's standard retry framework to catch the network failure, log the appropriate error code, and either re-attempt the upload or exit the active goroutine gracefully without crashing the parent daemon.
Exploitation of this vulnerability does not require authentication or complex payload generation. An attacker can trigger the crash by forcing a network transaction failure during an active rclone TUS session. This is achievable through two distinct vectors depending on the attacker's network placement.
The first vector involves a hostile WebDAV server configuration. If a user connects rclone to a malicious or compromised ownCloud Infinite Scale target, the remote server can manipulate the HTTP handshake. By accepting the incoming TCP connection for the TUS creation POST and immediately transmitting a TCP Reset (RST) packet without returning HTTP headers, the server triggers a transport failure. The rclone client processes this as a nil response pointer, resulting in an immediate process crash.
The second vector involves path-based network disruption. An on-path attacker capable of manipulating network packets can target active rclone synchronization routines. By injecting spoofed DNS responses, inducing TCP connection timeouts, or resetting active TLS sessions, the attacker causes a transport-level error. Since rclone fails to handle the resulting null response object, the entire virtual file system daemon collapses.
In an automated cloud backup environment, this vulnerability can be exploited by an attacker who has compromised a routing hop or a DNS server. By selectively dropping packets or returning TCP RST packets specifically when rclone initiates a TUS POST upload, the attacker can systematically take down all active rclone daemon instances across an enterprise network. This allows for targeted disruption of automated backup routines without requiring active write permissions on the client machines.
The proof-of-concept setup relies on simulating a network failure by pointing the WebDAV endpoint configuration to a loopback address where no listener is present. When rclone attempts to establish a connection, the local network stack returns a TCP connection refused error. This immediate failure triggers the vulnerable path, demonstrating that any arbitrary network blip is sufficient to trigger the fatal panic in production environments.
The overall impact of this vulnerability is a complete process-fatal denial of service (DoS) for all operations running under the affected rclone instance. While the vulnerability does not directly expose confidential files or allow arbitrary command execution, it severely degrades the availability of storage infrastructure. Many enterprise environments run rclone as a persistent daemon to serve file system mounts via the rclone mount command.
In these persistent deployments, file system operations run inside asynchronous, unrecovered background goroutines managed by the Go runtime. When the nil pointer dereference occurs, the unhandled panic bubbles up to the root of the Go execution thread. The runtime is forced to terminate the process, which unmounts the virtual drive and halts all concurrent operations. This causes synchronization failures and data transaction drops across the entire environment.
Conversely, if the transfer is initiated via rclone's Remote Control (RC) JSON-RPC interface, the impact is localized. The Remote Control server wraps active jobs inside execution recovery handlers, preventing the panic from terminating the host process. In this specific configuration, only the single upload job fails, while the primary daemon remains active. However, because most enterprise synchronization jobs rely on direct command executions and VFS mounts, the overall real-world risk remains high for daemon environments.
The down-time associated with an rclone crash can have severe downstream effects. For instance, when rclone is mounted to provide persistent storage for containers in a Kubernetes cluster or virtual machines, an unexpected unmount can leave mount points in a 'transport endpoint is not connected' state. This state prevents subsequent mounts from succeeding until the stale mount point is forcefully cleaned up by an administrator, compounding the duration of the denial of service.
Furthermore, because rclone does not automatically restart itself upon a runtime panic, administrators must configure external process monitors like systemd or supervisord to handle crashes. In environments without these automated recovery tools, a single transient network failure during a backup cycle can permanently disable the backup pipeline until manual intervention occurs, exposing the enterprise to data loss if another failure happens in the interim.
The primary remediation strategy is upgrading rclone to version 1.75.0 or later. The patch introduced in commit 5871d98c368751a6d992ed64f8cd22cb78c44cee successfully closes the vulnerable path. By placing the HTTP status evaluation inside a non-nil condition block, the software avoids attempting to read fields from null structures.
If an immediate upgrade is not feasible, administrators can apply configuration-level workarounds to reduce exposure. Since the crash is limited to TUS upload operations on the WebDAV backend, disabling the TUS protocol or reverting to standard Chunked uploads prevents execution of the vulnerable code path. Restricting rclone sync operations to verified internal networks also reduces the risk of on-path network injection attacks.
Security teams should implement monitoring alerts for application termination patterns. The signature log entry panic: runtime error: invalid memory address or nil pointer dereference combined with references to getTusLocationOrRetry inside the traceback indicates active exploitation or persistent transport failures triggering the flaw.
After upgrading to version 1.75.0, security administrators should verify the fix by running the local reproduction scenario. Pointing the ownCloud endpoint to an inactive local socket should now result in a clean error message in the console output rather than a panic traceback. The command should terminate with a 'connection refused' error and a non-zero exit code, confirming that the daemon is resilient against transport failures.
As a secondary defensive measure, developers using rclone in custom scripts should implement process monitoring loops. Standardizing on rclone's Remote Control (RC) API for managing active uploads rather than direct CLI spawning or static VFS mounting also isolates runtime failures, ensuring that even if other undiscovered panic paths exist in backend drivers, the core service layer remains online.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
rclone rclone | <= 1.74.0 | 1.75.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-476 (NULL Pointer Dereference) / CWE-248 (Uncaught Exception) |
| Attack Vector | Network |
| CVSS v3.1 | 5.3 (Medium) |
| EPSS Score | N/A (No CVE assigned) |
| Impact | Application crash / Denial of Service (DoS) |
| Exploit Status | Proof-of-Concept / Local Reproducer |
| KEV Status | Not listed |
The application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
CVE-2026-71324 is a high-severity HTTP request smuggling vulnerability in the Traefik reverse proxy. It allows an unauthenticated remote attacker to achieve cross-user response poisoning when Traefik is configured to route HTTP/2 or HTTP/3 CONNECT requests to an HTTP/1.1 upstream backend. By sending a crafted CONNECT request that is subsequently rejected by the backend with a keep-alive non-2xx response, the attacker can leave smuggled requests within the shared connection pool, which are then served to subsequent clients.
A path traversal vulnerability exists in the S3 emulation layer of rclone when executing the 'serve s3' subcommand. Because the application maps client-supplied S3 object keys containing relative directory sequences to file paths without proper boundary checks, an attacker can escape the logical containment of a target bucket. This enables unauthorized reading, writing, and deletion of files at the root level of the served storage directory.
A critical security flaw was identified in rclone before version 1.75.0, where the custom S3 redirect handler failed to sanitize sensitive authentication headers and encryption keys during cross-host redirects or transport downgrades. This flaw allows attackers on the path or controlling target hosts to intercept sensitive IBM IAM tokens, AWS S3 Express tokens, and customer-provided server-side encryption keys (SSE-C).
A protocol-level CRLF injection vulnerability exists in rclone's FTP backend before version 1.75.0. When configured with a non-default filename encoding, rclone allows carriage return and line feed characters to pass directly into the underlying FTP client library. Because the library constructs line-oriented control commands without input validation, an attacker-controlled filename can inject arbitrary FTP commands into the session, allowing unauthorized file deletion and modification on the target server.
A protocol downgrade vulnerability in rclone's WebDAV backend allows sensitive credentials, cookies, and authentication headers to be transmitted in cleartext. This occurs when a remote server redirects an HTTPS request to a plaintext HTTP URL on the same host, which the Go HTTP client default behavior permits without checking the protocol transport layer. This report provides a detailed technical analysis of the root cause, exploit mechanics, patch diff, and remediation strategies.
An incomplete sanitization vulnerability exists in rclone's SFTP backend before version 1.75.0 when performing server-side hashing operations on Windows hosts. Due to PowerShell treating Unicode smart quotes as equivalent to ASCII single quotes, malicious file paths can escape command string delimiters and execute arbitrary commands on the remote system.