GHSA-4vr5-p2gc-h23p is a medium-severity (CVSS 5) Path Traversal vulnerability in github.com/rclone/rclone. A fix is available for github.com/rclone/rclone — see the affected versions and patch details below.
rclone archive extract allows S3 destination prefix escape via crafted archive paths
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-4vr5-p2gc-h23p.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-4vr5-p2gc-h23p plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 376,715 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/rclone/rcloneReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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:
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:
: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:
../escaped-from-prefix.txt
then path.Join("prefix", "../escaped-from-prefix.txt") resolves to:
escaped-from-prefix.txt
As a result, the S3 backend uploads the object to:
bucket/safe/escaped-from-prefix.txt
instead of the expected destination:
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
-
Extract the attached PoC ZIP.
-
Run the PoC script:
powershell -ExecutionPolicy Bypass -File .\run-poc.ps1 -RcloneExe "C:\path\to\rclone.exe"
- The PoC creates a ZIP archive containing this entry:
../escaped-from-prefix.txt
- The PoC starts a local fake S3 endpoint and runs rclone with an S3-style destination prefix:
rclone archive extract malicious.zip :s3:bucket/safe/prefix
- Observe the fake S3 request log.
Expected safe behavior:
PUT /bucket/safe/prefix/escaped-from-prefix.txt
Observed behavior:
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.ps1fake-s3-server.pyREADME.mdreport-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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/rclone/rclone | all versions | 1.74.4go get github.com/rclone/rclone@v1.74.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/rclone/rclone, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/rclone/rclone to 1.74.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4vr5-p2gc-h23p is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-4vr5-p2gc-h23p can be triaged on real exposure rather than presence alone.
Tailored to GHSA-4vr5-p2gc-h23p. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-4vr5-p2gc-h23p in your dependencies?
O3 Security finds GHSA-4vr5-p2gc-h23p across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.