CVE-2026-79783
rclone before 1.74.4 Privilege Escalation via setuid Metadata
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
2.0
rclone before 1.74.4 Privilege Escalation via setuid Metadata
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
CVE-2026-79783- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 3.6 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
EUVDEUVD-2026-65541
2.0
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
EUVD-2026-65541- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-945v-v9p3-v5xw
3.6
rclone local `--metadata` applies attacker-controlled mode/uid - setuid binary planted from an untrusted remote
Summary
When writing an object with metadata, the local backend applies the source-supplied mode, uid, and gid verbatim: it parses mode as an octal integer and passes it straight into os.Chmod(o.path, os.FileMode(umode)), and passes uid/gid straight into os.Chown. The value is never masked to permission bits, so any value with Go's ModeSetuid (1<<23) or ModeSetgid (1<<22) bit set causes the setuid/setgid bit to be applied. Because both the file content and its metadata come from the (attacker-controlled) source remote, an attacker stores a binary of their choosing with mode = 40000755 (and uid = 0); when the victim runs rclone copy -M <remote>: /dest, rclone writes the attacker's binary and makes it setuid. If the victim runs rclone as root (typical for system backup/restore), the uid=0 chown plus setuid produces a root-owned setuid binary with attacker content — any local user then escalates to root. When rclone runs as a non-root service user, the planted setuid binary is owned by that user, giving any local user that user's privileges (lateral escalation / persistent backdoor).
Details
backend/local/metadata.go, writeMetadataToFile():
uid, hasUID := o.parseMetadataInt(m, "uid", 10)
gid, hasGID := o.parseMetadataInt(m, "gid", 10)
if hasUID {
...
err = os.Chown(o.path, uid, gid) // source-controlled owner, no same-uid guard
}
mode, hasMode := o.parseMetadataInt(m, "mode", 8)
if hasMode && mode >= 0 {
umode := uint(mode)
if umode <= math.MaxUint32 {
err = os.Chmod(o.path, os.FileMode(umode)) // <-- raw value; ModeSetuid/ModeSetgid NOT masked off
}
}
os.Chmod/os.FileMode honor ModeSetuid/ModeSetgid/ModeSticky. There is no &^ (os.ModeSetuid|os.ModeSetgid) mask and no check that the source is trusted, so an attacker-chosen mode string sets those bits on the freshly written, attacker-controlled file. (Note: a legitimate local source reports mode in unix st_mode layout e.g. 0106755, whose bit 1<<23 is unset, so honest copies happen to drop setuid — but the attacker supplies the Go-FileMode layout 40000755 directly, which sets it.)
PoC
- Get the official stable binary:
curl -fsSLO https://downloads.rclone.org/v1.74.3/rclone-v1.74.3-linux-amd64.zip
unzip -j rclone-v1.74.3-linux-amd64.zip '*/rclone' -d . # ./rclone -> v1.74.3
- Create a payload (the attacker-controlled binary content) and copy it with the malicious
modemetadata:
mkdir -p msrc mdst && cp /bin/true msrc/payload
./rclone copy -M --metadata-set mode=40000755 msrc mdst # 40000755 = Go FileMode setuid|0755
- Observe — the destination file is now setuid:
stat -c '%A %a' mdst/payload
-rwsr-xr-x 4755 # 's' = setuid bit SET on attacker binary
Variants: mode=20000755 → setgid (-rwxr-sr-x); mode=60000755 → both (-rwsr-sr-x). With rclone run as root and the source object also carrying uid=0/gid=0, the file is chown'd root:root, yielding a root-owned setuid binary executable by any local user.
Impact
A victim performing a metadata-preserving copy/restore (-M) from an untrusted or compromised remote installs an attacker-chosen executable with the setuid/setgid bit set. Run as root (system backup/restore, the common case for --metadata), this is a root-owned setuid root backdoor executable by any local user → local privilege escalation to root. Run as a non-root user, it is a setuid backdoor for that service account. The companion uid/gid application lets a root-run transfer also reassign ownership of written files arbitrarily.
Remediation
Mask special bits before applying mode from metadata — os.Chmod(o.path, os.FileMode(umode).Perm()) (or umode & 0o777) — and do not honor setuid/setgid/sticky from source metadata; gate uid/gid/setuid application behind an explicit opt-in (e.g. --local-metadata-set-ownership) that is off by…
- Record
GHSA-945v-v9p3-v5xw- CVSS 3.1
- 3.6 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vqwj-943v-724g
2.0
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode...
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
GHSA-vqwj-943v-724g- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 3.6 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
NVD
2.0
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
CVE-2026-79783- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 3.6 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
OSV
2.0
rclone before 1.74.4 Privilege Escalation via setuid Metadata
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
CVE-2026-79783- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-732
- Updated
- 2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2026-79783
2.0
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
DEBIAN-CVE-2026-79783- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-945v-v9p3-v5xw
3.6
rclone local `--metadata` applies attacker-controlled mode/uid - setuid binary planted from an untrusted remote
Summary
When writing an object with metadata, the local backend applies the source-supplied mode, uid, and gid verbatim: it parses mode as an octal integer and passes it straight into os.Chmod(o.path, os.FileMode(umode)), and passes uid/gid straight into os.Chown. The value is never masked to permission bits, so any value with Go's ModeSetuid (1<<23) or ModeSetgid (1<<22) bit set causes the setuid/setgid bit to be applied. Because both the file content and its metadata come from the (attacker-controlled) source remote, an attacker stores a binary of their choosing with mode = 40000755 (and uid = 0); when the victim runs rclone copy -M <remote>: /dest, rclone writes the attacker's binary and makes it setuid. If the victim runs rclone as root (typical for system backup/restore), the uid=0 chown plus setuid produces a root-owned setuid binary with attacker content — any local user then escalates to root. When rclone runs as a non-root service user, the planted setuid binary is owned by that user, giving any local user that user's privileges (lateral escalation / persistent backdoor).
Details
backend/local/metadata.go, writeMetadataToFile():
uid, hasUID := o.parseMetadataInt(m, "uid", 10)
gid, hasGID := o.parseMetadataInt(m, "gid", 10)
if hasUID {
...
err = os.Chown(o.path, uid, gid) // source-controlled owner, no same-uid guard
}
mode, hasMode := o.parseMetadataInt(m, "mode", 8)
if hasMode && mode >= 0 {
umode := uint(mode)
if umode <= math.MaxUint32 {
err = os.Chmod(o.path, os.FileMode(umode)) // <-- raw value; ModeSetuid/ModeSetgid NOT masked off
}
}
os.Chmod/os.FileMode honor ModeSetuid/ModeSetgid/ModeSticky. There is no &^ (os.ModeSetuid|os.ModeSetgid) mask and no check that the source is trusted, so an attacker-chosen mode string sets those bits on the freshly written, attacker-controlled file. (Note: a legitimate local source reports mode in unix st_mode layout e.g. 0106755, whose bit 1<<23 is unset, so honest copies happen to drop setuid — but the attacker supplies the Go-FileMode layout 40000755 directly, which sets it.)
PoC
- Get the official stable binary:
curl -fsSLO https://downloads.rclone.org/v1.74.3/rclone-v1.74.3-linux-amd64.zip
unzip -j rclone-v1.74.3-linux-amd64.zip '*/rclone' -d . # ./rclone -> v1.74.3
- Create a payload (the attacker-controlled binary content) and copy it with the malicious
modemetadata:
mkdir -p msrc mdst && cp /bin/true msrc/payload
./rclone copy -M --metadata-set mode=40000755 msrc mdst # 40000755 = Go FileMode setuid|0755
- Observe — the destination file is now setuid:
stat -c '%A %a' mdst/payload
-rwsr-xr-x 4755 # 's' = setuid bit SET on attacker binary
Variants: mode=20000755 → setgid (-rwxr-sr-x); mode=60000755 → both (-rwsr-sr-x). With rclone run as root and the source object also carrying uid=0/gid=0, the file is chown'd root:root, yielding a root-owned setuid binary executable by any local user.
Impact
A victim performing a metadata-preserving copy/restore (-M) from an untrusted or compromised remote installs an attacker-chosen executable with the setuid/setgid bit set. Run as root (system backup/restore, the common case for --metadata), this is a root-owned setuid root backdoor executable by any local user → local privilege escalation to root. Run as a non-root user, it is a setuid backdoor for that service account. The companion uid/gid application lets a root-run transfer also reassign ownership of written files arbitrarily.
Remediation
Mask special bits before applying mode from metadata — os.Chmod(o.path, os.FileMode(umode).Perm()) (or umode & 0o777) — and do not honor setuid/setgid/sticky from source metadata; gate uid/gid/setuid application behind an explicit opt-in (e.g. --local-metadata-set-ownership) that is off by…
- Record
GHSA-945v-v9p3-v5xw- CVSS 3.1
- 3.6 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-732
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-79783
2.0
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
UBUNTU-CVE-2026-79783- CVSS 4.0
- 2.0 Low
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 3.6 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
OSVBIT-rclone-2026-79783 No score
rclone before 1.74.4 Privilege Escalation via setuid Metadata
rclone before 1.74.4 fails to mask special permission bits when applying source-supplied mode metadata in the local backend, allowing attackers to set setuid/setgid bits on attacker-controlled files. When copying with metadata preservation from an untrusted remote, attackers can plant a setuid binary that escalates privileges to root if rclone runs as root, or to the service account user otherwise.
- Record
BIT-rclone-2026-79783- Updated
- 2026-11-02
OSVGO-2026-6190 No score
Unsafe file permission restoration from metadata in github.com/rclone/rclone
Unsafe file permission restoration from metadata in github.com/rclone/rclone
- Record
GO-2026-6190- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/rclone/rcloneGo |
through 1.74.3 | 1.74.4 |
rcloneBitnami |
before 1.74.4 | 1.74.4 |
rcloneDebian:12 |
All versions, plus listed versions 1.60.1+dfsg-21.60.1+dfsg-31.60.1+dfsg-41.65.0+dfsg-11.65.0+dfsg-21.69.3+dfsg-11.69.3+dfsg-21.69.3+dfsg-3 |
None known |
rcloneDebian:13 |
All versions, plus listed versions 1.60.1+dfsg-41.65.0+dfsg-11.65.0+dfsg-21.69.3+dfsg-11.69.3+dfsg-21.69.3+dfsg-3 |
None known |
github.com/rclone/rcloneGo |
before 1.74.4 | 1.74.4 |
rcloneUbuntu:18.04:LTS |
All versions, plus listed versions 1.36-31.36-3ubuntu0.11.36-3ubuntu0.2 |
None known |
rcloneUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 1.47.0+ex1-61.47.0+ex1-71.49.5-21.49.5-31.50.2-21.50.2-2ubuntu0.11.50.2-2ubuntu0.21.50.2-2ubuntu0.2+esm1 |
None known |
rcloneUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 1.53.3-11.53.3-21.53.3-41.53.3-4ubuntu11.53.3-4ubuntu1.22.04.1 Show 7 moreShow less1.53.3-4ubuntu1.22.04.21.53.3-4ubuntu1.22.04.31.53.3-4ubuntu1.22.04.3+esm11.53.3-4ubuntu1.22.04.41.53.3-4ubuntu1.22.04.4+esm11.53.3-4ubuntu1.22.04.51.53.3-4ubuntu1.22.04.5+esm1 |
None known |
rcloneUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 1.60.1+dfsg-2build11.60.1+dfsg-31.60.1+dfsg-3ubuntu0.24.04.11.60.1+dfsg-3ubuntu0.24.04.21.60.1+dfsg-3ubuntu0.24.04.3 Show 6 moreShow less1.60.1+dfsg-3ubuntu0.24.04.41.60.1+dfsg-3ubuntu0.24.04.4+esm11.60.1+dfsg-3ubuntu0.24.04.51.60.1+dfsg-3ubuntu0.24.04.5+esm11.60.1+dfsg-3ubuntu0.24.04.61.60.1+dfsg-3ubuntu0.24.04.6+esm1 |
None known |
rcloneUbuntu:26.10 |
All versions, plus listed versions 1.60.1+dfsg-4ubuntu31.69.3+dfsg-31.69.3+dfsg-3ubuntu1 |
None known |
rcloneUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 1.60.1+dfsg-4ubuntu21.60.1+dfsg-4ubuntu31.60.1+dfsg-4ubuntu3.11.60.1+dfsg-4ubuntu3.1+esm11.60.1+dfsg-4ubuntu3.21.60.1+dfsg-4ubuntu3.2+esm1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-79783 is a low vulnerability (CVSS 2.0) in Rclone, published August 5, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.23%, the 13th percentile. Fixed in github.com/rclone/rclone 1.74.4.
References
github.com/rclone/rclone/security/advisories/GHSA-945v-v9p3-v5xw
vulncheck.com/advisories/rclone-before-privilege-escalation-via-setuid-metadata
github.com/rclone/rclone/commit/e58f09739a35774ca82b5211d2377ac0f2051500
github.com/rclone/rclone/releases/tag/v1.74.4
github.com/advisories/GHSA-945v-v9p3-v5xw
nvd.nist.gov/vuln/detail/CVE-2026-79783
Left out here: the rest of 2 source descriptions. The JSON record has them.