Junglewise Threat Intelligence

CVE-2026-54563: Cloudreve path traversal in WebDAV scoped credentials

CVE-2026-54563 · Severity: high · CVSS 7.1 · Published 2026-07-15

Technologies: github.com/cloudreve/Cloudreve/v4 (Go), github.com/cloudreve/Cloudreve/v3 (Go), Cloudreve. Vendors: Go, Cloudreve.

Executive brief

Cloudreve's WebDAV service allows users to access files through a web-based sync interface with limited permissions. A vulnerability in the /dav endpoint fails to validate that scoped WebDAV credentials stay within their assigned folder, allowing an attacker to read, list, create, and delete files across the entire user's account using path traversal techniques like `%2e%2e` (encoded `..`).

Technical details

The WebDAV request handler in `pkg/webdav/webdav.go` (function `stripPrefix`) trims the `/dav` prefix from incoming requests and joins the remainder to a credential's base folder using `fs.URI.JoinRaw`, but performs no validation that the resulting path stays within the configured root. Go's `net/http` server decodes URL-encoded sequences (`%2e%2e` to `..`, `%2f` to `/`) before passing the path to handlers, and the `JoinRaw` method delegates to Go's standard `url.URL.JoinPath`, which resolves `..` segments. A request like `GET /dav/%2e%2e/outside.txt` against a credential rooted at `cloudreve://my/restricted` resolves to `cloudreve://my/outside.txt`, escaping the scope. Read-only credentials can read and list files outside their folder; writable credentials can also create, overwrite, move, and delete them. The breach is contained within a single user's namespace; it does not cross to other users or the OS filesystem. A patch is available and adds a post-join containment check using the existing `EqualOrIsDescendantOf` predicate.

Affected products

  • Cloudreve Cloudreve v3 <= 3.0.0-20250225100611-da4e44b77af4; v4 < 4.0.0-20260606032813-26b6b1044b02

Timeline

  • 2026-07-08: disclosed: Published to GitHub Advisory Database
  • 2026-08-26: advisory: GitHub Security Advisory GHSA-w5fv-7x5q-g8qp published
  • 2026-06-06: patched: Cloudreve v4.0.0-20260606032813-26b6b1044b02 includes fix

References

Related threats