CVE-2026-59732: Github.com/rclone/rclone Rclone Archive Extract Allows S3 Vulnerability

MODERATE
Advisory Identifier: GHSA-4vr5-p2gc-h23p
CVSS 5.0
CWE-22
Published
Advisory Summary

CVE-2026-59732 is a MODERATE (CVSS 5.0) rclone archive extract allows s3 vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/rclone/rclone libraries in the Go ecosystem. The issue involves rclone archive extract allows s3 destination prefix escape via crafted archive paths. Remediation is available by upgrading affected packages to version 1.74.4.

CVE-2026-59732 at a Glance

CVE Identifier CVE-2026-59732
GHSA Identifier GHSA-4vr5-p2gc-h23p
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/rclone/rclone
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:L).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-59732

To remediate this vulnerability, upgrade all affected Github.com/rclone/rclone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/rclone/rclone fixed: 1.74.4
Upgrade github.com/rclone/rclone to 1.74.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/rclone/rclone

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-59732, inspect your project dependencies for Github.com/rclone/rclone:

inspect dependencies for github.com/rclone/rclone

Analyze the terminal output to locate any version of Github.com/rclone/rclone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.74.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/rclone/rclone, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `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. ### Details The affected code path is in `cmd/archive/extract/extract.go`. In `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: ```go remote := f.NameInArchive remote = strings.TrimPrefix(remote, "./") if dstDir != "" { remote = path.Join(dstDir, remote) } _, err = operations.Rcat(ctx, dst, remote, fin, f.ModTime(), nil) ``` Parent path components such as `../` are not rejected before `path.Join()` is used. When the destination is an S3-style remote such as: ```text :s3:bucket/safe/prefix ``` rclone creates the destination filesystem rooted at `bucket/safe` and treats `prefix` as the destination directory. If the archive contains an entry named: ```text ../escaped-from-prefix.txt ``` then `path.Join("prefix", "../escaped-from-prefix.txt")` resolves to: ```text escaped-from-prefix.txt ``` As a result, the S3 backend uploads the object to: ```text bucket/safe/escaped-from-prefix.txt ``` instead of the expected destination: ```text bucket/safe/prefix/escaped-from-prefix.txt ``` This allows an attacker-controlled archive to escape the selected extraction prefix on object-storage remotes. ### PoC Test environment: - Windows 11 - rclone v1.74.3 official Windows amd64 binary - Local fake S3 HTTP endpoint - Crafted ZIP archive containing `../escaped-from-prefix.txt` Steps to reproduce:https://drive.google.com/file/d/1P_cLKFgiWSVSATB8500yP28jdzwt9FAt/view?usp=sharing 1. Extract the attached PoC ZIP. 2. Run the PoC script: ```powershell powershell -ExecutionPolicy Bypass -File .\run-poc.ps1 -RcloneExe "C:\path\to\rclone.exe" ``` 3. The PoC creates a ZIP archive containing this entry: ```text ../escaped-from-prefix.txt ``` 4. The PoC starts a local fake S3 endpoint and runs rclone with an S3-style destination prefix: ```powershell rclone archive extract malicious.zip :s3:bucket/safe/prefix ``` 5. Observe the fake S3 request log. Expected safe behavior: ```text PUT /bucket/safe/prefix/escaped-from-prefix.txt ``` Observed behavior: ```text PUT /bucket/safe/escaped-from-prefix.txt?x-id=PutObject ``` This shows that the archive entry escaped the requested `safe/prefix` destination and was written under `safe/` instead. The PoC package includes: - `run-poc.ps1` - `fake-s3-server.py` - `README.md` - `report-draft.md` - captured proof logs ### Impact An 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. Depending 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. This 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.

CVE-2026-59732 Affected Github.com/rclone/rclone Versions

1 component(s)
Fixed Versions:
1.74.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/rclone/rclone
Go
< 1.74.4
1.74.4

References

Frequently Asked Questions

What is CVE-2026-59732?
CVE-2026-59732 is a security vulnerability in Github.com/rclone/rclone involving rclone archive extract allows S3 destination prefix escape via crafted archive paths under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/rclone/rclone versions are affected?
Affected versions include releases prior to 1.74.4 across affected packages: github.com/rclone/rclone.
What version fixes CVE-2026-59732?
Upgrading to 1.74.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/rclone/rclone affected?
Yes, github.com/rclone/rclone is affected in releases prior to 1.74.4. Upgrade your dependency to 1.74.4 or later.
What is the CVSS score of CVE-2026-59732?
CVE-2026-59732 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:L.
What CWE is associated with CVE-2026-59732?
CVE-2026-59732 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-59732?
Run the dependency tree command: 'inspect dependencies for github.com/rclone/rclone'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4vr5-p2gc-h23p",
  "modified" : "2026-08-05T20:43:47Z",
  "published" : "2026-08-05T20:43:47Z",
  "aliases" : [ "CVE-2026-59732" ],
  "summary" : "rclone archive extract allows S3 destination prefix escape via crafted archive paths",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/rclone/rclone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.74.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.74.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rclone/rclone/security/advisories/GHSA-4vr5-p2gc-h23p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59732"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rclone/rclone/commit/1a746732441e8158f32fab35924b23701e719a8c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rclone/rclone/commit/d11efe0d58fe6a2d6d90675bb9d8ee5840c51e1d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rclone/rclone"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rclone/rclone/releases/tag/v1.74.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-05T20:43:47Z",
    "nvd_published_at" : "2026-07-14T22:17:29Z"
  }
}