Summary
Incomplete fix of CVE-2026-35606: the /api/resources checksum branch still reads the full file and returns its digest without a Perm.Download check, so a user provisioned with Perm.Download=false gets a file-content hash oracle. It does not defeat scope/path authorization; it bypasses only the Download permission, yielding a content-hash oracle rather than plaintext. Confirmed at HEAD b7dc392.
The defect
CVE-2026-35606 was that /api/resources returned file content while bypassing Perm.Download. The fix (PR #5891, v2.63.1) gated the content-returning paths (changed the hardcoded Content: true to Content: d.user.Perm.Download, and added a 202 guard to the raw-byte X-Encoding branch). The same handler has a third full-file-reading path, the ?checksum= branch, which reads the entire file to compute a digest and returns it; it was not given a Perm.Download check.
http/resource.go, resourceGetHandler, the checksum branch (around lines 69-79):
if checksum := r.URL.Query().Get("checksum"); checksum != "" {
err := file.Checksum(checksum) // reads the whole file into the hash (files/file.go:170-207)
...
return renderJSON(w, r, file) // returns the digest in the checksums map
}
resourceGetHandler (withUser) has no Perm.Download check at the top. The three sibling read paths do guard it: raw.go:85 (if !d.user.Perm.Download { return http.StatusAccepted, nil }), preview.go:39, and subtitle.go:18. The checksum branch does not.
Attacker model and impact
An authenticated low-privilege user provisioned with Perm.Download=false (a first-class supported permission, the exact configuration CVE-2026-35606 is written against). GET /api/resources/?checksum=sha256 (also md5/sha1/sha512) with X-Auth returns the file digest. This is a Download-gate bypass yielding a file-content hash oracle: confirm known or guessed content, detect changes over time, or brute-force low-entropy files offline. It is broader than CVE-2026-35606 in that it hashes any file type of any size, with no text-only restriction and no 10 MB detectType cap. It does not defeat the scope/path authorization (only same-scope files).
Proof of concept: as a user with Perm.Download=false, GET /api/resources/?checksum=sha256 with a valid X-Auth token; the sha256 digest is returned.
Verification
Source-verified at HEAD: the checksum branch calls file.Checksum with no Perm.Download check, while raw.go:85 guards the same permission. I did not run a live File Browser.
Suggested fix
Add if !d.user.Perm.Download { return http.StatusAccepted, nil } ahead of the checksum branch in resourceGetHandler, matching the raw/preview/subtitle siblings.
Tooling
I used AI assistance while investigating, but I read the checksum branch (confirming no Perm.Download check) and raw.go (confirming the sibling guards it) myself at HEAD, so the inconsistency is source-verified.
Summary
Incomplete fix of CVE-2026-35606: the /api/resources checksum branch still reads the full file and returns its digest without a Perm.Download check, so a user provisioned with Perm.Download=false gets a file-content hash oracle. It does not defeat scope/path authorization; it bypasses only the Download permission, yielding a content-hash oracle rather than plaintext. Confirmed at HEAD b7dc392.
The defect
CVE-2026-35606 was that /api/resources returned file content while bypassing Perm.Download. The fix (PR #5891, v2.63.1) gated the content-returning paths (changed the hardcoded Content: true to Content: d.user.Perm.Download, and added a 202 guard to the raw-byte X-Encoding branch). The same handler has a third full-file-reading path, the ?checksum= branch, which reads the entire file to compute a digest and returns it; it was not given a Perm.Download check.
http/resource.go, resourceGetHandler, the checksum branch (around lines 69-79):
resourceGetHandler (withUser) has no Perm.Download check at the top. The three sibling read paths do guard it: raw.go:85 (
if !d.user.Perm.Download { return http.StatusAccepted, nil }), preview.go:39, and subtitle.go:18. The checksum branch does not.Attacker model and impact
An authenticated low-privilege user provisioned with Perm.Download=false (a first-class supported permission, the exact configuration CVE-2026-35606 is written against). GET /api/resources/?checksum=sha256 (also md5/sha1/sha512) with X-Auth returns the file digest. This is a Download-gate bypass yielding a file-content hash oracle: confirm known or guessed content, detect changes over time, or brute-force low-entropy files offline. It is broader than CVE-2026-35606 in that it hashes any file type of any size, with no text-only restriction and no 10 MB detectType cap. It does not defeat the scope/path authorization (only same-scope files).
Proof of concept: as a user with Perm.Download=false, GET /api/resources/?checksum=sha256 with a valid X-Auth token; the sha256 digest is returned.
Verification
Source-verified at HEAD: the checksum branch calls file.Checksum with no Perm.Download check, while raw.go:85 guards the same permission. I did not run a live File Browser.
Suggested fix
Add
if !d.user.Perm.Download { return http.StatusAccepted, nil }ahead of the checksum branch in resourceGetHandler, matching the raw/preview/subtitle siblings.Tooling
I used AI assistance while investigating, but I read the checksum branch (confirming no Perm.Download check) and raw.go (confirming the sibling guards it) myself at HEAD, so the inconsistency is source-verified.