/

CVE-2026-59733

Severity:

HIGH RISK

(8.8)

Path Traversal, ID Confusion in Rclone Restic Service

CVE-2026-59733

Analyzed

Vulnerability type

Category:

Path Traversal and Authorization Logic Error

CWE:

CWE-22, CWE-639

Impact:

Cross-Repository Access and Data Compromise

Severity:

HIGH RISK

(8.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

A path traversal and authorization confusion issue in rclone's serve restic --private-repos mode lets an authenticated user craft URL paths containing .. to target other users' private repositories on certain backends.

When backends normalize path components, this mismatch between routed user identity and backend object key can allow reading, overwriting, or deleting another user's data.

Affected context

The vulnerability occurs in deployments using rclone serve restic --private-repos with backends that normalize or clean path components (such as treating .. segments as directory traversal).

In this context, rclone enforces authorization based on the routed user path segment, but derives the backend object key from the raw, uncleaned URL path.

When these two interpretations diverge, a user's request can be authorized for one repository while actually pointing to another user's repository on the backend.

Exploit preconditions

  • Attack surface: HTTP interface exposed by rclone serve restic --private-repos
  • Required access: Valid authenticated user account with access to their own private repository
  • Trigger point: Crafted REST requests embedding .. or similar path manipulation in URL segments (e.g., //..//config)
  • Why exploitation is possible: Authorization decisions use the routed, cleaned user path, while backend object resolution uses the raw uncleaned URL path; backend path normalization then resolves the manipulated path into another user's repository.

Why this happens

The core issue is a mismatch between authorization logic and storage path resolution, combining CWE-22: Path Traversal with CWE-639: Insecure Direct Object Reference.

Rclone checks permissions using a sanitized routing segment representing the authenticated user's repository, but constructs backend object keys directly from the uncleaned URL path.

On backends that normalize path components (including ..), this allows a user-controlled URL to traverse to objects outside their own repository while still passing the authorization checks, violating repository isolation assumptions.

Potential impact

  • An authenticated user may read another user's private restic repository data.
  • An authenticated user may overwrite or corrupt backups belonging to other users.
  • An authenticated user could delete other users' backup content, causing data loss.
  • Cross-tenant data exposure and integrity violations can occur on shared rclone-backed storage.

General mitigation guidance

Effective mitigation typically focuses on aligning authorization decisions with the exact paths used at the storage layer and eliminating opportunities for path traversal.

Common defensive patterns include:

  • Normalizing and validating URL paths before authorization checks and backend key construction, ensuring both use the same cleaned representation.
  • Rejecting requests containing .., duplicate slashes, or other ambiguous path constructs for repository-scoped APIs.
  • Implementing strict repository scoping, where the repository identifier is not solely derived from user-controlled path segments.
  • Reducing privileges of the service account used to access backend storage so that it cannot access unrelated tenant data.
  • Designing APIs so that identifiers for sensitive objects (repositories, buckets) are not directly manipulable through free-form paths.

How teams detect issues like this

Detection efforts can focus on identifying both flawed path handling and suspicious access patterns.

Useful approaches include:

  • Static analysis rules that flag uses of raw URL paths when constructing backend keys, especially alongside separate authorization checks.
  • Code reviews that verify path normalization occurs once and that the same normalized value drives routing, authorization, and backend access.
  • Logging and monitoring of repository access to detect cross-user access anomalies, such as a single user accessing multiple distinct repositories unexpectedly.
  • Policy enforcement in CI/CD pipelines that require consistent path sanitization practices and prohibit use of user-controlled paths for direct object reference.
  • Optional use of automated security scanning tools that understand CWE-22 and CWE-639 patterns to highlight risky URL/path usage.

Sources

SourceLink
github.comgithub.com/rclone/rclone/commit/015fd0eba1cb138eef081517795fed47a2873f2d
github.comgithub.com/rclone/rclone/commit/dade21c1616035b044df0eef7ee6a85aeb06a139
github.comgithub.com/rclone/rclone/releases/tag/v1.74.4
github.comgithub.com/rclone/rclone/security/advisories/GHSA-fqj9-69pf-6pjg

Frequently asked

questions

No. Exploitation requires a valid authenticated user of the rclone serve restic --private-repos service. However, any authenticated user with access to their own repository may attempt to access other users' repositories via crafted paths.

The attacker needs ordinary authenticated access to the restic service endpoint and the ability to submit customized HTTP requests. They do not need administrative privileges, but they must be able to control URL path segments.

The safest fix is to ensure that the same normalized path value is used consistently for routing, authorization, and backend access. Reject path traversal constructs, tightly scope repository identifiers, and avoid basing object keys on raw user-controlled URLs.

Future designs should apply early path normalization, validate against a strict allowlist of repository identifiers, and treat user-controlled paths as untrusted input. Consistent security reviews, static analysis focused on path handling, and multi-tenant isolation guidelines can help prevent comparable issues.

Find out what's already
exploitable in your codebase.