rclone: Verbose Stack Trace Disclosure in RC API Error ResponsesGHSA-gwfq-86j8-7qhv
LOWFix: rclone/rclone@ff43a1eGHSA-gwfq-86j8-7qhv is a low-severity (CVSS 2.7) CWE-209 vulnerability in github.com/rclone/rclone. A fix is available for github.com/rclone/rclone — see the affected versions and patch details below.
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-gwfq-86j8-7qhv.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
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
When an RC API call triggers a panic (recovered by the job runner), the full Go stack trace is included in the JSON error response. This leaks internal file paths, Go module versions, goroutine state, and memory addresses to the API caller.
Details
The panic recovery in fs/rc/jobs/job.go:110-115:
func (j *Job) run(ctx context.Context, fn rc.Func, in rc.Params) {
defer func() {
if r := recover(); r != nil {
j.mu.Lock()
j.EndTime = time.Now()
j.Error = fmt.Sprintf("panic received: %v \n%s", r, string(debug.Stack()))
// ...
}
}()
The full debug.Stack() output is placed into j.Error, which is then returned in the HTTP response JSON.
PoC
Trigger a parse error by setting config path to a non-INI file, then calling dump:
curl -s -X POST http://localhost:5572/config/setpath \
-H "Content-Type: application/json" \
-d '{"path":"/etc/hostname"}'
curl -s -X POST http://localhost:5572/config/dump
Response includes:
{
"error": "panic received: fatal error: Failed to load config file \"/etc/hostname\": could not parse line: ... \ngoroutine 9 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x64\ngithub.com/rclone/rclone/fs/rc/jobs.(*Job).run.func1()\n\tgithub.com/rclone/rclone/fs/rc/jobs/job.go:112 +0x34\n...",
"status": 500
}
Disclosed information includes:
- Full filesystem paths (
github.com/rclone/rclone/fs/config/config.go:377) - Go module versions (
github.com/go-chi/chi/[email protected]) - Go runtime version (from binary)
- Goroutine IDs and states
- Memory addresses (ASLR leak)
- File contents (first unparseable line of the target file)
Tested and confirmed on rclone v1.74.4.
Impact
Information disclosure that aids exploitation of other vulnerabilities. Stack traces reveal internal architecture, dependency versions (useful for known-CVE targeting), and memory layout. The error message also leaks partial file contents (the first line that fails INI parsing), which can be used alongside the arbitrary file read finding as a complementary file read primitive for non-INI files.
Affected Versions
All versions with RC API support through at least v1.74.4.
Remediation
Return a generic error message to the API caller. Log the full stack trace server-side only. Strip debug.Stack() from HTTP responses.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/rclone/rclone | all versions | 1.75.0go get github.com/rclone/rclone@v1.75.0 |
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.75.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gwfq-86j8-7qhv is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A flaw was found in rclone. The Remote Control (RC) API can include sensitive information such as internal paths, configuration details, or error context in error responses. An authenticated administrator with access to the RC API can observe this information, which may aid in further attacks against the system.
Restrict access to the rclone RC API to trusted networks and administrators only. Use the --rc-allow-origin and --rc-user/--rc-pass flags to enforce authentication. Where possible, disable the RC API entirely if not required for operations.Source: Red Hat security advisory for GHSA-gwfq-86j8-7qhv (CC BY 4.0)
Frequently Asked Questions
Is GHSA-gwfq-86j8-7qhv in your dependencies?
Find it across Go, including transitive dependencies.