{"id":"CVE-2026-59732","aliases":["CVE-2026-59732","GHSA-4vr5-p2gc-h23p","BIT-RCLONE-2026-59732","GO-2026-6185"],"related":[],"kind":"vulnerability","state":"published","title":"rclone archive extract allows S3 destination prefix escape via crafted archive paths","summary":"Rclone is a command-line program to sync files and directories to and from different cloud storage providers. Prior to 1.74.4, rclone archive extract can write extracted files outside the user-selected destination prefix when extracting a crafted archive containing parent path components such as ../, allowing creation or overwrite of sibling objects in the same bucket or path scope. 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, rclone archive extract can write extracted files outside the user-selected destination prefix when extracting a crafted archive containing parent path components such as ../, allowing creation or overwrite of sibling objects in the same bucket or path scope. This issue is fixed in version 1.74.4.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`rclone archive extract` can write extracted files outside the user-selected destination prefix when extracting a crafted archive. A malicious archive entry containing parent path components such as `../` can escape the requested extraction prefix and create or overwrite sibling objects in the same bucket/path scope.\n\n### Details\n\nThe affected code path is in `cmd/archive/extract/extract.go`.\n\nIn `ArchiveExtract()`, the archive entry path is taken from `f.NameInArchive`. The code strips only a leading `./` prefix and then joins the archive entry path with the destination directory:\n\n```go\nremote := f.NameInArchive\nremote = strings.TrimPrefix(remote, \"./\")\nif dstDir != \"\" {\n    remote = path.Join(dstDir, remote)\n}\n_, err = operations.Rcat(ctx, dst, remote, fin, f.ModTime(), nil)\n```\n\nParent path components such as `../` are not rejected before `path.Join()` is used.\n\nWhen the destination is an S3-style remote such as:\n\n```text\n:s3:bucket/safe/prefix\n```\n\nrclone creates the destination filesystem rooted at `bucket/safe` and treats `prefix` as the destination directory. If the archive contains an entry named:\n\n```text\n../escaped-from-prefix.txt\n```\n\nthen `path.Join(\"prefix\", \"../escaped-from-prefix.txt\")` resolves to:\n\n```text\nescaped-from-prefix.txt\n```\n\nAs a result, the S3 backend uploads the object to:\n\n```text\nbucket/safe/escaped-from-prefix.txt\n```\n\ninstead of the expected destination:\n\n```text\nbucket/safe/prefix/escaped-from-prefix.txt\n```\n\nThis allows an attacker-controlled archive to escape the selected extraction prefix on object-storage remotes.\n\n### PoC\n\nTest environment:\n\n- Windows 11\n- rclone v1.74.3 official Windows amd64 binary\n- Local fake S3 HTTP endpoint\n- Crafted ZIP archive containing `../escaped-from-prefix.txt`\n\nSteps to reproduce:https://drive.google.com/file/d/1P_cLKFgiWSVSATB8500yP28jdzwt9FAt/view?usp=sharing\n\n1. Extract the attached PoC ZIP.\n\n2. Run the PoC script:\n\n```powershell\npowershell -ExecutionPolicy Bypass -File .\\run-poc.ps1 -RcloneExe \"C:\\path\\to\\rclone.exe\"\n```\n\n3. The PoC creates a ZIP archive containing this entry:\n\n```text\n../escaped-from-prefix.txt\n```\n\n4. The PoC starts a local fake S3 endpoint and runs rclone with an S3-style destination prefix:\n\n```powershell\nrclone archive extract malicious.zip :s3:bucket/safe/prefix\n```\n\n5. Observe the fake S3 request log.\n\nExpected safe behavior:\n\n```text\nPUT /bucket/safe/prefix/escaped-from-prefix.txt\n```\n\nObserved behavior:\n\n```text\nPUT /bucket/safe/escaped-from-prefix.txt?x-id=PutObject\n```\n\nThis shows that the archive entry escaped the requested `safe/prefix` destination and was written under `safe/` instead.\n\nThe PoC package includes:\n\n- `run-poc.ps1`\n- `fake-s3-server.py`\n- `README.md`\n- `report-draft.md`\n- captured proof logs\n\n### Impact\n\nAn attacker who supplies an archive that a victim extracts with `rclone archive extract` can cause extracted files to be written outside the destination prefix selected by the victim when the destination is an S3-style object storage remote.\n\nDepending on the victim's configured remote credentials and bucket permissions, this may allow creation or overwrite of sibling objects outside the intended extraction directory/prefix.\n\nThis does not require compromising the S3 service itself. The attack relies on the victim extracting an attacker-controlled archive with rclone into an object-storage prefix.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Path traversal via crafted archive paths in github.com/rclone/rclone","format":"markdown","source":"go"}],"published":"2026-07-14T21:36:21.030Z","modified":"2026-09-10T03:50:53.313Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:L","score":5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:L","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:L","score":5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-22"],"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-4vr5-p2gc-h23p","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/commit/1a746732441e8158f32fab35924b23701e719a8c","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://github.com/rclone/rclone/commit/d11efe0d58fe6a2d6d90675bb9d8ee5840c51e1d","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-59732","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/rclone/rclone","tags":["package"],"sources":["ghsa"]}],"credits":["Dangel (GitHub: Dangel165)"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-21T14:43:33.295Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-59732","url":"https://www.cve.org/CVERecord?id=CVE-2026-59732","licence":"CVE Terms of Use","modified":"2026-07-21T14:43:46.387Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4vr5-p2gc-h23p","url":"https://github.com/advisories/GHSA-4vr5-p2gc-h23p","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:53.313Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6185","url":"https://pkg.go.dev/vuln/GO-2026-6185","licence":"CC-BY-4.0","modified":"2026-08-18T17:23:53.843Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-59732","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59732","licence":"Public domain","modified":"2026-07-21T16:17:18.697Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-RCLONE-2026-59732","url":"https://osv.dev/vulnerability/BIT-RCLONE-2026-59732","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.974Z"}],"updatedAt":"2026-11-25T22:59:28.250Z","epss":{"score":0.0026,"percentile":0.18909,"date":"2026-12-01T12:00:22.000Z"}}