Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/rclone/rclone
  4. ›
  5. CVE-2026-59733

CVE-2026-59733: rclone `serve restic --private-repos` authorization bypass: `..` in the URL path lets an authenticated user read, overwrite and delete other users' repositories

August 5, 2026

rclone serve restic --private-repos exists to let one rclone instance host many users’ restic backup repositories behind HTTP Basic auth while keeping each user confined to a path prefix of /<username>/. The documentation states the flag “can be used to limit users to repositories starting with a path of /<username>/”, and the shipped test TestResticPrivateRepositories asserts that user test may reach /test/config but is 403-blocked from /other_user/config. This isolation is the entire security purpose of the flag.

The isolation is enforced by two independent chi middlewares that derive the username and the backend object path from two different sources, and the path source is never canonicalized. checkPrivate authorizes the request by comparing the routed {userID} path segment against the authenticated user, while WithRemote builds the backend object key from the raw, un-cleaned URL path. A request such as GET /<me>/../<victim>/config keeps the first path segment equal to the attacker’s own username (so checkPrivate returns the request as authorized) yet hands the backend the literal remote me/../victim/config. On any backend that resolves object paths with POSIX path.Join/path.Clean semantics — which includes the bundled memory backend used in the PoC below, and the widely deployed sftp and ftp backends — that .. segment collapses, and the operation is performed against the victim’s object.

Because the same un-cleaned remote feeds the GET (download), POST (upload/overwrite) and DELETE handlers, any authenticated user can read, overwrite, and delete the files of any other user’s private repository hosted on the same server. For restic that means reading another tenant’s config/keys metadata and pack files, corrupting their repository, or deleting their backups outright (subject to --append-only, which still permits cross-tenant reads).

References

  • github.com/advisories/GHSA-fqj9-69pf-6pjg
  • github.com/rclone/rclone/commit/015fd0eba1cb138eef081517795fed47a2873f2d
  • github.com/rclone/rclone/commit/dade21c1616035b044df0eef7ee6a85aeb06a139
  • github.com/rclone/rclone/releases/tag/v1.74.4
  • github.com/rclone/rclone/security/advisories/GHSA-fqj9-69pf-6pjg
  • nvd.nist.gov/vuln/detail/CVE-2026-59733

Code Behaviors & Features

Detect and mitigate CVE-2026-59733 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.74.4

Fixed versions

  • 1.74.4

Solution

Upgrade to version 1.74.4 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-639: Authorization Bypass Through User-Controlled Key

Source file

go/github.com/rclone/rclone/CVE-2026-59733.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 11 Aug 2026 12:20:23 +0000.