A AegiFlow
HIGHCVSS 7.1EPSS 0.3%

CVE-2026-54563

Cloudreve WebDAV (`/dav`) has Path Traversal / Broken Access Control — scoped DAV credential escapes its configured account root

Published
2026-08-26
Modified
2026-08-26
EPSS percentile
24%
Aliases
GHSA-w5fv-7x5q-g8qp
Sources
github-advisory

Summary

## Summary A Cloudreve WebDAV account stores a `uri` that defines the account's root folder. The WebDAV request handler (`stripPrefix` in `pkg/webdav/webdav.go`) trims the `/dav` prefix from the request path and joins the remainder to that root with `fs.URI.JoinRaw`, but never checks that the joined URI stays inside the root. Go's `net/http` decodes `%2e%2e` to `..` and `%2f` to `/` in `r.URL.Path` before the handler sees it, and `JoinRaw` resolves `..` segments through the standard library's `url.URL.JoinPath`. A request such as `GET /dav/%2e%2e/outside.txt` against a credential rooted at `cloudreve://my/restricted` therefore resolves to `cloudreve://my/outside.txt`. A scoped DAV credential can read and list files outside its configured folder; a writable scoped credential can also create, overwrite, move, and delete them. The escape stays inside the same Cloudreve user's namespace because downstream DBFS owner checks still apply. It does not cross into another user's files or onto the OS filesystem. What it breaks is the per-folder WebDAV-account boundary — the entire reason scoped DAV accounts exist (delegating limited access to a sync client or a third party). ## Technical Detail ### Root cause `stripPrefix` joins the request suffix onto the account base with no containment check: ```go // pkg/webdav/webdav.go @ 54dc81d func stripPrefix(p string, u *ent.User) (string, *fs.URI, int, error) { base, err := fs.NewUriFromString(u.Edges.DavAccounts[0].URI) if err != nil { return "", nil, http.StatusInternalServerError, err } prefix := davPrefix // "/dav" if r := strings.TrimPrefix(p, prefix); len(r) 200 REQUEST: PROPFIND /dav/%2e%2e/ handler observed: URL.Path="/dav/../" RawPath="/dav/%2e%2e/" -> 200 REQUEST: PUT /dav/%2e%2e/created-outside.txt handler observed: URL.Path="/dav/../created-outside.txt" -> 200 REQUEST: GET /dav/%2F..%2Foutside.txt handler observed: URL.Path="/dav//../outside.txt" RawPath="/dav/%2F..%2Foutside.txt" -> 200 ``` The path is decoded but never cleaned. Gin does not rewrite `Request.URL.Path`, so the Cloudreve handler observes the same value. ### Layer 2 — Cloudreve's URI resolution escapes the root Re-running Cloudreve's exact `PathEscape` / `shouldEscape` / `Join` / `JoinRaw` / `NewUriFromString` code (copied verbatim from `uri.go @ 54dc81d`) against the real `net/url` library, with base `cloudreve://my/restricted`: ``` traversal %2e%2e URL.Path=/dav/../outs

Affected packages

EcosystemPackageAffected versionsFixed versions
Gogithub.com/cloudreve/Cloudreve/v3
Gogithub.com/cloudreve/Cloudreve/v44.0.0-20260606032813-26b6b1044b02

Remediation: No patched version is listed by GitHub.

References

Includes data from the GitHub Advisory Database, licensed under CC-BY 4.0.

CVE® is a registered trademark of The MITRE Corporation. CVE content reproduced under the CVE Terms of Use; copyright designation © MITRE.

EPSS scores provided by the FIRST.org Exploit Prediction Scoring System.