GHSA-4vr5-p2gc-h23p: Path Traversal

Published Aug 5, 2026
·
Updated

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/1PcLKFgiWSVSATB8500yP28jdzwt9FAt/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.

Affected Software

1 affected componentFixes available
go/github.com/rclone/rclone<=1.74.3
1.74.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/rclone/rclone to a version that resolves this vulnerability.

    Fixed in 1.74.4
  2. Upgrade

    Upgrade rclone to a version that resolves this vulnerability.

    Fixed in v1.74.3
  3. Compensating control

    When extracting attacker-supplied ZIP archives to an S3-style remote (e.g., `:s3:bucket/safe/prefix`) with `rclone archive extract`, prevent write access outside the intended prefix using bucket policy/permissions so that sibling objects under `bucket/safe/` (outside `safe/prefix/`) cannot be created or overwritten.

Event History

Aug 5, 2026
Advisory Published
via GitHub·08:43 PM
Data Sourced
via GitHub·08:43 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-4vr5-p2gc-h23p?

The severity of GHSA-4vr5-p2gc-h23p is medium with a score of 5.

2

How do I fix GHSA-4vr5-p2gc-h23p?

To fix GHSA-4vr5-p2gc-h23p, update rclone to a version that includes the patch for this path traversal vulnerability.

3

What type of vulnerability is GHSA-4vr5-p2gc-h23p?

GHSA-4vr5-p2gc-h23p is a path traversal vulnerability that allows extraction of files outside the specified destination.

4

What software is affected by GHSA-4vr5-p2gc-h23p?

The software affected by GHSA-4vr5-p2gc-h23p is rclone.

5

What can attackers do with GHSA-4vr5-p2gc-h23p?

Attackers can exploit GHSA-4vr5-p2gc-h23p to create or overwrite files outside the intended extraction directory using crafted archives.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203