---
id: "CVE-2026-77633"
kind: "vulnerability"
aliases: ["CVE-2026-77633", "GHSA-xj3h-wwxq-gfcj", "GO-2026-6578"]
title: "Cloudreve: Storage-quota TOCTOU race allows quota bypass and storage-based denial of service in github.com/cloudreve/Cloudreve"
severity: "high"
cvss: 7.1
epss: 0.00368
exploited: false
status: "open"
category: "package"
products: [{"name": "github.com/cloudreve/Cloudreve", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/cloudreve/Cloudreve/v3", "fixed": [], "affected": "all versions", "ecosystem": "go"}, {"name": "github.com/cloudreve/Cloudreve/v4", "fixed": ["4.0.0-20260715025621-7329602751c0"], "affected": "< 4.0.0-20260715025621-7329602751c0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["cloudreve", "file-sharing", "go", "package", "self-hosted"]
not_affected_if: ["managed-hosting", "version-4.18.0-or-later"]
published_at: "2026-09-22T16:17:55+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T21:45:50+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6578", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-77633", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-77633", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# Cloudreve: Storage-quota TOCTOU race allows quota bypass and storage-based denial of service in github.com/cloudreve/Cloudreve

Cloudreve's upload-session code checks a user's storage quota from a stale in-memory value and charges storage outside the quota-enforcing transaction, so concurrent upload requests can all pass the check. An authenticated user with Files.Write permission can reserve more storage than their quota allows and fill the host's disk, blocking uploads for other users.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/cloudreve/Cloudreve affected all versions fixed ?
- go:github.com/cloudreve/Cloudreve/v3 affected all versions fixed ?
- go:github.com/cloudreve/Cloudreve/v4 affected < 4.0.0-20260715025621-7329602751c0 fixed 4.0.0-20260715025621-7329602751c0

## How to check

Check the deployed Cloudreve version; the description says versions before 4.18.0 are affected.

## Fix

Upgrade Cloudreve to 4.18.0 or later. govuln lists the fixed v4 module version as 4.0.0-20260715025621-7329602751c0, so confirm which build you are running.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6578
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-77633
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-77633

## From the sources

Cloudreve is a self-hosted file management and sharing system. Prior to 4.18.0, PrepareUpload in pkg/filemanager/fs/dbfs/upload.go checks a stale in-memory user storage value through validateUserCapacity and later applies an unconditional storage charge outside the same quota-enforcing transaction. An authenticated user with Files.Write permission can issue concurrent upload-session requests that read the same capacity snapshot, all pass the MaxStorage check, and reserve their declared sizes through CommitWithStorageDiff. The resulting reservations can exceed the account quota and can be materialized as chunked uploads that exhaust host storage and deny uploads to other users. The default local-storage policy and default User group are affected. This issue is fixed in version 4.18.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
