/

CVE-2026-54563

Severity:

HIGH RISK

(7.1)

Authorization Bypass (CWE-863) in Cloudreve WebDAV

CVE-2026-54563

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Privilege Escalation via Out-of-Scope File Access

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path handling flaw in Cloudreve's WebDAV interface allows accounts scoped to a specific folder to access files outside their configured root by using encoded parent-directory sequences.

When an attacker controls a WebDAV account, they can read, list, and, if permitted, modify files beyond their intended directory boundary, turning a scoped credential into broader file-system access.

Affected context

This vulnerability arises in Cloudreve deployments that expose the WebDAV interface and rely on folder-based scoping to restrict what each account can access.

It is relevant when WebDAV credentials are configured to be rooted at a specific directory, but the server joins request paths with the account root without enforcing containment.

Under these conditions, encoded traversal-like paths can effectively escape the configured folder, causing scoped accounts to operate on files in higher-level or sibling directories.

Exploit preconditions

  • Attack surface: Cloudreve WebDAV endpoint accessible over the network
  • Required access: Valid WebDAV credentials scoped to a configured folder (read-only or writable)
  • Trigger point: Sending WebDAV requests with URL-encoded path segments such as %2e%2e that resolve outside the account's root directory
  • Why exploitation is possible: The stripPrefix logic in pkg/webdav/webdav.go uses fs.URI.JoinRaw to join the decoded request suffix with the account root but does not verify that the resulting path remains within the configured folder, leading to an authorization rule bypass

Why this happens

The underlying issue is an authorization implementation flaw where path normalization and containment checks are incomplete.

Cloudreve's WebDAV handler trusts joined paths produced by fs.URI.JoinRaw without enforcing that the final resolved path stays under the account's designated root directory.

This maps to CWE-863: Incorrect Authorization, because the system fails to apply the intended access control policy when processing specially crafted, encoded paths, allowing users to perform operations on resources that should be outside their scope.

Potential impact

  • Scoped WebDAV accounts may read files outside their configured folder.
  • Attackers could list directory contents beyond the intended root, exposing sensitive metadata.
  • Writable WebDAV credentials could create or overwrite files in higher-level or sibling directories.
  • Files may be moved or deleted outside the authorized scope, leading to data loss or tampering.

General mitigation guidance

Effective mitigation focuses on enforcing strict path containment and robust authorization checks for WebDAV operations.

Common defensive patterns include:

  • Normalizing and resolving request paths against the account root before authorization, then rejecting any operation that would escape the configured directory.
  • Treating URL-encoded segments and traversal-like components consistently during path resolution, so that encoded variants cannot bypass checks.
  • Separating path parsing from authorization logic, ensuring that access control decisions are made on canonical, validated resource paths.
  • Applying least privilege for WebDAV accounts, limiting writable access and avoiding broad filesystem exposure wherever possible.

How teams detect issues like this

Detection typically involves reviewing how resource paths are constructed and authorized within the WebDAV handling code.

Helpful approaches include:

  • Static analysis rules that flag path-joining functions used in access control logic without subsequent containment verification.
  • Manual code review focused on WebDAV request handlers, checking that all paths are normalized and validated against an access-controlled root before file operations.
  • Logging and monitoring of WebDAV requests containing encoded traversal-like segments (e.g., %2e%2e) and correlating them with unusual file access patterns.
  • Enforcement of secure coding policies that require canonicalization of file paths prior to authorization decisions, audited through automated code review tools integrated in CI pipelines.

Sources

SourceLink
github.comgithub.com/cloudreve/cloudreve/security/advisories/GHSA-w5fv-7x5q-g8qp

Frequently asked

questions

Yes. Any attacker with network access to the Cloudreve WebDAV endpoint and valid scoped credentials can exploit it by sending crafted WebDAV requests, without needing local access to the server.

The attacker must possess a WebDAV account rooted at a configured folder. Read-only accounts can still access out-of-scope files for reading and listing, while writable accounts can also create, overwrite, move, or delete files beyond their intended directory.

The safest pattern is to normalize and resolve all WebDAV request paths against the account root and then enforce strict containment: if the canonical path would leave the configured directory, the request should be rejected before any file operation. Authorization decisions must always be based on these validated, canonical paths.

Preventing similar issues requires a combination of secure path-handling practices and robust access control design: always canonicalize and validate resource paths; centralize authorization checks around a clear resource model; avoid ad hoc path-joining in authorization logic; and regularly review WebDAV and file-API code with static analysis and security-focused code reviews.

Find out what's already
exploitable in your codebase.