Aug 6, 2026·11 min read·17 visits
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-107387 is a high-impact uncontrolled memory allocation vulnerability in music-metadata, a widely used Node.js metadata parser. The flaw occurs in the APEv2 tag parser, where the library reads an attacker-controlled 32-bit integer indicating the tag size and immediately requests a corresponding heap buffer reservation. Because this allocation occurs before validating if the input stream actually contains those bytes, an attacker can supply a minuscule audio file to trigger large, disproportionate allocations, resulting in heap exhaustion and an uncatchable process-wide Out of Memory (OOM) crash.
An input validation vulnerability exists in music-metadata versions prior to 11.16.0, where parsing a crafted MP4 file containing a sample-description (stsd) box with a zero-value size entry causes a synchronous infinite loop and memory exhaustion, resulting in complete Denial of Service.
A path traversal vulnerability in datamodel-code-generator allows remote attackers to write or overwrite arbitrary files on the local host filesystem via a manipulated Protobuf schema containing malicious weak import paths.
PraisonAI is vulnerable to an arbitrary local file read vulnerability prior to version 4.6.78. The flaw is in the ContextGatherer component, where validation checks are executed only after files are parsed and appended to the context bundle, bypassing security constraints.
An algorithmic complexity vulnerability (CWE-770) in the Excelize library allows remote attackers to cause resource exhaustion (100% CPU usage) via a crafted Microsoft Excel spreadsheet. This occurs because the look-ahead row index parsing in Rows.Columns() fails to enforce upper boundary limits, enabling an out-of-bounds row index to trigger an infinite seek loop inside the Rows iterator.
An unauthenticated Server-Side Request Forgery (SSRF) vulnerability exists in Ghost CMS from version 6.54.1 to 6.65.0. The vulnerability stems from a validation bypass in the favicon resolution logic within the bookmark-fetching subsystem, which allows remote, unauthenticated attackers to trigger arbitrary HTTP requests to the local host and internal networks. This bypass circumvents the custom DNS-level IP blocklist controls configured globally in the application.