Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/cloudreve/Cloudreve/v4
  4. ›
  5. CVE-2026-77633

CVE-2026-77633: Cloudreve: Storage-quota TOCTOU race allows quota bypass and storage-based denial of service

September 22, 2026

Cloudreve v4 splits the storage-quota check (reading the user’s used bytes and comparing them to MaxStorage) and the charge (incrementing users.storage) into two non-atomic steps in the PrepareUpload code path. This creates a Time-of-Check to Time-of-Use (TOCTOU) race condition. Any authenticated user — including an unprivileged account in the default User group — can concurrently issue several upload-session requests that all read the same stale used snapshot, each pass the check, and then each contribute their declared size to users.storage. The end result is that the total approved capacity exceeds the group’s MaxStorage many times over.

The same primitive is trivially amplifiable into a storage-based denial of service. During PrepareUpload, Cloudreve reserves the declared size against users.storage before any bytes are written, so an attacker can push the reserved amount far beyond the host’s physical disk (tested: a 1 GiB-quota account reserved 17 GiB in a single 20-way burst), and can then materialise the reservation by completing chunked uploads to actually write the excess bytes to disk. Amplification to the host’s free space fills the disk and denies uploads for every user of the instance.

Exploitation requires only a valid session with Files.Write permission. No administrator configuration, no non-default storage policy, and no elevated privileges are needed. The default deployment (local storage policy, default User group) is affected.

References

  • github.com/advisories/GHSA-xj3h-wwxq-gfcj
  • github.com/cloudreve/cloudreve/commit/7329602751c00bb4136fe9ad8b364d0df70773df
  • github.com/cloudreve/cloudreve/releases/tag/4.18.0
  • github.com/cloudreve/cloudreve/security/advisories/GHSA-xj3h-wwxq-gfcj
  • nvd.nist.gov/vuln/detail/CVE-2026-77633

Code Behaviors & Features

Detect and mitigate CVE-2026-77633 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.0.0-20260715025621-7329602751c0

Fixed versions

  • 4.0.0-20260715025621-7329602751c0

Solution

Upgrade to version 4.0.0-20260715025621-7329602751c0 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H

Learn more about CVSS

Weakness

  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

go/github.com/cloudreve/Cloudreve/v4/CVE-2026-77633.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 13 Oct 2026 00:16:56 +0000.