Skip to content

rclone: Verbose Stack Trace Disclosure in RC API Error Responses

Low severity GitHub Reviewed Published Jul 31, 2026 in rclone/rclone • Updated Aug 5, 2026

Package

gomod github.com/rclone/rclone (Go)

Affected versions

<= 1.74.4

Patched versions

1.75.0

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\nmygithub.libinneed.workers.dev/rclone/rclone/fs/rc/jobs.(*Job).run.func1()\n\tmygithub.libinneed.workers.dev/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/v5@v5.2.5)
  • 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.

References

@ncw ncw published to rclone/rclone Jul 31, 2026
Published to the GitHub Advisory Database Aug 5, 2026
Reviewed Aug 5, 2026
Last updated Aug 5, 2026

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N

EPSS score

Weaknesses

Generation of Error Message Containing Sensitive Information

The product generates an error message that includes sensitive information about its environment, users, or associated data. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-gwfq-86j8-7qhv

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.