Cloudreve: Storage-quota TOCTOU race allows quota bypass and storage-based denial of service
## Summary 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` grou
GHSA-xj3h-wwxq-gfcj
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-xj3h-wwxq-gfcj
github.com/cloudreve/Cloudreve/v4
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 4.0.0-20260715025621-7329602751c0
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.0.0-20260715025621-7329602751c0"
}
]
}
],
"package": {
"name": "github.com/cloudreve/Cloudreve/v4",
"purl": "pkg:golang/github.com/cloudreve/Cloudreve/v4",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-xj3h-wwxq-gfcj/GHSA-xj3h-wwxq-gfcj.json"
}
}
]- Related CVEs
- CVE-2026-77633
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #63879 · Revision 1
- Added to Heist Feed
- Publisher date
GO-2026-6578
Revision 2
Cloudreve: Storage-quota TOCTOU race allows quota bypass and storage-based denial of service in github.com/cloudreve/Cloudreve
Cloudreve: Storage-quota TOCTOU race allows quota bypass and storage-based denial of service in github.com/cloudreve/Cloudreve
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GO-2026-6578
github.com/cloudreve/Cloudreve
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/cloudreve/Cloudreve/v3
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/cloudreve/Cloudreve/v4
Source reference: /affected/2/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 4.0.0-20260715025621-7329602751c0
Source reference:
/affected/2/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "github.com/cloudreve/Cloudreve",
"purl": "pkg:golang/github.com/cloudreve/Cloudreve",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6578.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "github.com/cloudreve/Cloudreve/v3",
"purl": "pkg:golang/github.com/cloudreve/Cloudreve/v3",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6578.json"
},
"ecosystem_specific": {}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.0.0-20260715025621-7329602751c0"
}
]
}
],
"package": {
"name": "github.com/cloudreve/Cloudreve/v4",
"purl": "pkg:golang/github.com/cloudreve/Cloudreve/v4",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6578.json"
},
"ecosystem_specific": {}
}
]- Related CVEs
- CVE-2026-77633
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #63881 · Revision 2
- Added to Heist Feed
- Publisher date