Rclone SFTP Auth-Proxy Bypass via Public Key (CVE-2026-134352)
Rclone's serve sftp auth-proxy cache ignored the credential kind, so a known public key could log in as its owner; fixed in 1.76.0.
TL;DR
- Rclone's
serve sftp --auth-proxycached the backend returned by the proxy under the username, the credential and the client IP, but not the credential kind. A public key replayed as a password hit the same cache entry. - Rclone 1.51.0 through 1.75.2 with
serve sftpand--auth-proxyis affected. An attacker who knows a user's base64 public key can seed the cache with an unsigned key offer, then log in as that user. - VulnCheck published CVE-2026-134352 on 2026-11-21, rated CVSS v4.0 9.2 Critical and v3.1 8.1 High. Rclone's own advisory rates it High 8.1. No exploitation is known and the CVE is not in CISA KEV as of 2026-11-22.
- Upgrade to rclone 1.76.0 or later. If the upgrade has to wait, stop using
--auth-proxyonserve sftp, because the password callback cannot be turned off while the proxy is enabled.
Am I affected?
All of these conditions must hold for a deployment to be exposed:
- It runs
rclone serve sftpwith--auth-proxy <program>. - The rclone binary is 1.51.0 through 1.75.2. Version 1.76.0 fixes the flaw.
- An attacker knows the base64 encoding of an SSH public key that the auth proxy accepts. Public keys are not secrets and are often published or readable.
- The attacker can connect to the service. They seed the cached entry with an unsigned public-key offer, then use the password method as the same username from the same client IP before the entry expires. The default lifetime is 300 seconds of disuse, refreshed on each access. No login by the key's owner is required.
The proxy's policy does not remove the exposure. PasswordCallback calls the proxy for every password attempt whenever a proxy is configured, so a deployment whose proxy accepts public keys and refuses every password still has a reachable password path. On a Unix socket, ipFromAddr returns an empty string for every client, so the same-IP condition stops being a barrier. Because the attacker creates the entry with the unsigned offer, the 300-second window starts when the attacker connects.
| Release line | Affected versions | Fixed version |
|---|---|---|
Rclone 1.x with serve sftp --auth-proxy |
1.51.0 through 1.75.2 | 1.76.0 |
Rclone 1.x without --auth-proxy |
None | Not applicable |
The CVE record rates the flaw CVSS v4.0 9.2 Critical (CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N) and CVSS v3.1 8.1 High (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H). The vendor advisory rates it CVSS v3.1 8.1 High.
Only serve sftp is affected. The serve ftp, serve http and serve webdav commands pass false for the public-key flag, and serve s3 uses a separate access-key path. A host that runs rclone only for copy, sync or mount operations never reaches this code.
Check the running binary and the service definition:
rclone version
ps -eo pid,args | grep '[r]clone serve sftp'
grep -rn -- '--auth-proxy' /etc/systemd/system /lib/systemd/system 2>/dev/null
For a container, check the process inside the running container rather than a freshly pulled image:
docker exec <container> rclone version
docker inspect <container> --format '{{json .Config.Cmd}} {{json .Config.Entrypoint}}'
How do I fix it?
Upgrade to rclone 1.76.0 or later and restart every serve sftp process. The fix is in the proxy cache and the SFTP authentication callbacks, so a restart is required even when the binary is replaced in place.
- Update the binary with the method you deployed it by.
rclone selfupdateinstalls the current stable release, which is 1.76.0:
rclone selfupdate
rclone version
- For the official container image, pull 1.76.0 and recreate the container. A running container keeps the old binary until it is replaced:
docker pull rclone/rclone:1.76.0
docker stop rclone
docker rm rclone
docker run -d --name rclone -v /srv/rclone:/config/rclone rclone/rclone:1.76.0 serve sftp --auth-proxy /path/to/proxy
- For a Go build, move the module to the fixed tag and rebuild:
go install github.com/rclone/rclone@v1.76.0
- For distribution packages, confirm the package version is 1.76.0 or later. A distribution that still ships 1.75.2 leaves the deployment exposed even after a normal package upgrade.
If the upgrade cannot happen now, remove --auth-proxy from serve sftp and serve a fixed set of users with --user and --pass or --authorized-keys. That removes the vulnerable proxy cache entirely. Restricting the service to a management network reduces the attack surface but does not fix the cache logic, because an attacker who can reach the service still needs the same-IP condition to be met. There is no setting that disables password authentication while --auth-proxy is in use.
What is the root cause?
The auth-proxy cache key did not include the credential kind. A public key and the same public key sent as a password produced the same key, so the second request was served the first request's cached backend without the proxy being consulted.
Proxy.Call is the single entry point for serve sftp authentication. It computes a cache key, looks the key up in p.vfsCache, and only calls the proxy program on a miss. The vulnerable key function is in cmd/serve/proxy/proxy.go at v1.75.2:
func generateCacheKey(user, auth, clientIP string) string {
mac := hmac.New(sha256.New, cacheKeyHMACKey)
mac.Write([]byte(auth))
// Separate the two so ("ab", "c") can't collide with ("a", "bc")
mac.Write([]byte{0})
mac.Write([]byte(clientIP))
return user + "-" + hex.EncodeToString(mac.Sum(nil)[:8])
}
The key covers the username outside the hash, and the credential and client IP inside it. The credential kind, which the caller knows as isPublicKey, is not part of the input. Proxy.Call reads that flag only on a miss, to tell the proxy program which method the client used:
func (p *Proxy) Call(user, auth string, isPublicKey bool, remoteAddr string) (VFS *vfs.VFS, vfsKey string, err error) {
clientIP := ipFromAddr(remoteAddr)
cacheKey := generateCacheKey(user, auth, clientIP)
value, ok := p.vfsCache.GetMaybe(cacheKey)
if !ok {
kind := authPassword
if isPublicKey {
kind = authPublicKey
}
value, err = p.call(user, auth, kind, clientIP)
if err != nil {
return nil, "", err
}
}
// ...
authHash := sha256.Sum256([]byte(auth))
if subtle.ConstantTimeCompare(authHash[:], entry.pwHash[:]) != 1 {
// reject
}
return entry.vfs, cacheKey, nil
}
The two SSH callbacks supply the credential in the same encoding. PublicKeyCallback in cmd/serve/sftp/server.go base64-encodes the marshalled public key and calls Proxy().Call with true. PasswordCallback passes the password bytes as a string and calls Proxy().Call with false. When the password bytes are the base64 public key, the auth argument is byte-identical, so the HMAC matches.
A second defect made the cached entry easy to create. Before the fix, PublicKeyCallback asked the proxy for a backend as soon as a client offered a key, before the client proved it held the private key. The SSH library calls that callback during key negotiation with an unsigned offer. An attacker who knew a public key could therefore make rclone create and cache a backend for that user without holding the private key.
How is it exploited?
An attacker who knows a user's public key logs in as that user by first seeding the cache with an unsigned key offer, then sending the key as a password from the same address.
- The deployment runs
rclone serve sftp --auth-proxy <program>, and the proxy accepts the victim's public key. - The attacker obtains the victim's public key, for example from an
authorized_keysfile, a public repository or a keyserver, and base64-encodes the wire format. - The attacker connects as the victim's username and offers the public key without a signature, which the SSH library does during key negotiation. Rclone's
PublicKeyCallbackasks the proxy, receives the victim's backend, and caches it under the username, the base64 key and the attacker's client IP. The connection itself is not authenticated. - Within the 300-second cache lifetime, the attacker reconnects as the same username from the same client IP and authenticates with the password method, using the base64 public key as the password.
PasswordCallbackcomputes the same cache key. The lookup hits the victim's entry, and the SHA-256 comparison of the credential matches because the string is identical.- Rclone returns the cached backend and never calls the proxy program, so the proxy's policy and its audit log do not see the login.
A legitimate login by the key's owner creates the same cache entry, but it is not required. The fix commit for the unsigned key offer states that the combination let an attacker log in as any user whose public key they knew, from their own IP address and without the user having logged in.
The advisory reports an end-to-end reproduction against a real serve sftp listener on 127.0.0.1. Holding only the base64 public key, the tester read the victim's file and wrote a new file into the victim's backend. An instrumented proxy recorded zero invocations during the attacker's session. Rclone credits torjan0, Saku0512, utkarsh2102, ncw and calbebop in the advisory.
How does the attack flow?
An attacker offers the public key without a signature to seed the cache, then replays it as a password. The cache key ignores the credential kind, so the replay matches the entry and returns the victim's backend without the proxy being asked.
unsigned from their own IP"] --> B["Proxy returns the victim backend"] B --> C["Cache key is HMAC of credential and IP
no credential kind"] C --> D["Attacker sends the same base64 key
as a password from the same IP"] D --> E["Same cache key hits the victim entry
credential string matches"] E --> F["Proxy is not called
attacker gets read-write VFS"]
What can an attacker do?
An attacker with a victim's public key gains that victim's read-write view of the backend for the cache window, and can repeat the attack by seeding a fresh entry.
- Read and write the victim's files. The advisory's reproduction read a file and wrote a new one. Rclone's SFTP layer exposes the backend's full read-write operations, including create, overwrite, rename and delete.
- Bypass the proxy's authorization and audit. The proxy program is the component that maps a user to a backend and can revoke access. A cache hit skips it, so a revocation recorded in the proxy does not apply to the cached session.
- Cross a tenant boundary. When one rclone server fronts several backends through one proxy, the cached entry belongs to the victim's backend, so the attacker reaches that backend rather than their own.
The conditions are listed in full here. The deployment must use serve sftp with --auth-proxy; the proxy must accept the victim's public key; and the attacker must know that key. The attacker then seeds the entry with an unsigned offer and reconnects as the same username from the same client IP, which is the attacker's own address. Behind NAT, a bastion host or a load balancer, many clients share an address, and on a Unix socket every client has the empty string. The attacker does not need the private key, a password, a prior login by the owner, or any access to the proxy program.
The impact stops at the backend the proxy returned for that user. The advisory demonstrates file read and write. It does not demonstrate code execution on the rclone host, and the post does not claim it.
Why does the fix work?
The fix adds the credential kind to the cache key and checks it on a hit. It also stops the proxy from running for public keys the client has not yet proved it holds.
-func generateCacheKey(user, auth, clientIP string) string {
+func generateCacheKey(user, auth string, kind authKind, clientIP string) string {
mac := hmac.New(sha256.New, cacheKeyHMACKey)
+ mac.Write([]byte{byte(kind)})
mac.Write([]byte(auth))
// Separate the two so ("ab", "c") can't collide with ("a", "bc")
mac.Write([]byte{0})
mac.Write([]byte(clientIP))
return user + "-" + hex.EncodeToString(mac.Sum(nil)[:8])
}
Proxy.Call now derives kind before the lookup and passes it to generateCacheKey, so a password request and a public-key request can never share an entry. The final guard also compares the stored kind, not only the credential hash:
authHash := sha256.Sum256([]byte(auth))
- if subtle.ConstantTimeCompare(authHash[:], entry.pwHash[:]) != 1 {
+ if entry.kind != kind || subtle.ConstantTimeCompare(authHash[:], entry.pwHash[:]) != 1 {
The second change moves the proxy call out of PublicKeyCallback and into a new VerifiedPublicKeyCallback, which the SSH library calls only after the client has signed with the private key:
PublicKeyCallback: func(c ssh.ConnMetadata, pubKey ssh.PublicKey) (*ssh.Permissions, error) {
fs.Debugf(describeConn(c), "Public key login attempt for %s", c.User())
if s.provider.IsProxy() {
- _, vfsKey, err := s.provider.Proxy().Call(...)
+ // This is also called for keys offered without a
+ // signature, so leave asking the proxy until
+ // VerifiedPublicKeyCallback when the client has proved
+ // it holds the private key.
+ return &ssh.Permissions{}, nil
}
Together the changes close both halves of the attack: a cached entry cannot be reached with a different credential kind, and an unsigned key offer cannot create an entry. CallAccessKey was updated to pass authAccessKey, so the S3 path keeps a distinct key too. The fix is complete for the serve sftp proxy path named in the advisory.
How do I check if I was compromised?
The attack leaves no file on disk. A cache hit skips the proxy program, so the strongest check is to compare rclone's authentication log with the proxy's own log for the same time window.
Rclone logs each password attempt at debug level from PasswordCallback. On a deployment whose proxy accepts only public keys, any password line is suspicious:
journalctl -u rclone --since "30 days ago" | grep -i "Password login attempt"
The proxy program's log should record one invocation per accepted login. A successful SFTP login in rclone's connection log with no matching proxy invocation is the signature of a cache hit. Compare on the username and the source IP:
grep -i "login attempt" /var/log/rclone.log
grep -i "<username>" /var/log/auth-proxy.log
Then look for writes the legitimate user did not make in the backend that the proxy maps to that user. Rclone's SFTP server does not log per-file operations by default. No indicators of compromise, IP addresses or file hashes are published for this CVE, and an attempt that failed the cache conditions may leave no trace beyond a refused SSH handshake.
Timeline
- 2026-10-09: The two fix commits were authored in the rclone repository.
- 2026-11-06: Rclone 1.76.0 was released and the vendor advisory GHSA-66qv-66mg-9h74 was published.
- 2026-11-21: VulnCheck published CVE-2026-134352 at 16:34 UTC.
FAQ
Does this affect serve ftp, serve http, serve webdav or serve s3?
No. Only serve sftp passes true for the public-key flag. The FTP, HTTP and WebDAV servers pass false, and S3 uses CallAccessKey with its own key kind.
My auth proxy rejects every password. Am I still affected?
Yes. PasswordCallback calls the proxy whenever a proxy is configured, and the callback is unconditional. The proxy never sees the attacker's attempt because the cache answers first.
Does the attacker need the victim's private key or password? No. The attacker needs the base64 public key, which is not a secret. The unsigned key offer populates the cache entry, so the private key and a login by the owner are not needed.
How long is the attack window? The cached entry lives for 300 seconds of disuse and is refreshed on each access. An attacker who misses one window can retry by seeding the entry again.
Does the attacker need to come from the same IP address? The first and second connection must share the cache key, so both use the same username and client IP. That is the attacker's own address, not the victim's. Behind NAT, a bastion host or a load balancer, many clients share one address. On a Unix socket, every client has the empty string as its address, so the condition disappears.
Is CVE-2026-134352 exploited in the wild? No exploitation is known as of 2026-11-22, and the CVE is not in CISA KEV. The advisory reports a successful lab reproduction, not attacks.
Find exposed SFTP services with Ostorlab
Ostorlab's attack surface discovery inventories the hosts and services your organisation exposes, including SFTP endpoints, so you know which systems to check and patch first. Detection of this specific rclone flaw is not confirmed; the inventory is the starting point for the manual version and configuration check in "Am I affected?".
References
- Rclone security advisory GHSA-66qv-66mg-9h74, published 2026-11-06 (checked November 22, 2026): https://github.com/rclone/rclone/security/advisories/GHSA-66qv-66mg-9h74
- CVE-2026-134352 record, published 2026-11-21 (checked November 22, 2026): https://www.cve.org/CVERecord?id=CVE-2026-134352
- Fix commit f6ca72fabb09, "serve sftp: fix auth proxy letting a public key be used as a password", authored 2026-10-09 (checked November 22, 2026): https://github.com/rclone/rclone/commit/f6ca72fabb09
- Fix commit 866e7ac577aa, "serve sftp: fix auth proxy running for public keys the client can't use", authored 2026-10-09 (checked November 22, 2026): https://github.com/rclone/rclone/commit/866e7ac577aa
- Rclone v1.76.0 release, published 2026-11-06 (checked November 22, 2026): https://github.com/rclone/rclone/releases/tag/v1.76.0
- Rclone downloads page (checked November 22, 2026): https://rclone.org/downloads/
- Rclone repository, 61,155 stars (checked November 22, 2026): https://github.com/rclone/rclone
- Official rclone container image, 145,855,065 pulls (checked November 22, 2026): https://hub.docker.com/r/rclone/rclone