Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/rclone/rclone
  4. ›
  5. GHSA-945v-v9p3-v5xw

GHSA-945v-v9p3-v5xw: rclone local `--metadata` applies attacker-controlled mode/uid - setuid binary planted from an untrusted remote

August 5, 2026

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).

References

  • github.com/advisories/GHSA-945v-v9p3-v5xw
  • github.com/rclone/rclone/commit/e58f09739a35774ca82b5211d2377ac0f2051500
  • github.com/rclone/rclone/releases/tag/v1.74.4
  • github.com/rclone/rclone/security/advisories/GHSA-945v-v9p3-v5xw

Code Behaviors & Features

Detect and mitigate GHSA-945v-v9p3-v5xw 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 3.6 LOW

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

Learn more about CVSS

Weakness

  • CWE-732: Incorrect Permission Assignment for Critical Resource

Source file

go/github.com/rclone/rclone/GHSA-945v-v9p3-v5xw.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 11 Aug 2026 12:21:43 +0000.