A broken access control vulnerability allows unauthenticated users to retrieve note assets directly from the asset download endpoint when they know both the note UUID and asset UUID. This exposes the full contents of private note assets without authentication, even when the associated book is not public.
The issue is caused by the asset download route being registered without authentication middleware.
Relevant route registration:
handlers/assets.go, line 40huma.Get(api, "/api/notes/{noteID}/assets/{assetID}", h.GetNoteAssetContentByID)
By contrast, other asset operations correctly apply authentication middleware. For example:
huma.Delete(api, "/api/notes/{noteID}/assets/{assetID}", h.DeleteNoteAsset,
huma.WithMiddleware(h.authMiddleware.AuthRequiredMiddleware))
The backend service for asset retrieval also does not enforce ownership or visibility checks. According to the provided code references, the lookup only queries the asset table by asset ID and note ID:
SELECT * FROM note_assets WHERE id = ? AND note_id = ?
Because the retrieval path does not join against the related notes or books records, it does not verify:
As a result, possession of a valid noteID and assetID is sufficient to retrieve the asset binary, regardless of whether the note belongs to a private book.
The exploitability is constrained by identifier knowledge. Both noteID and assetID are UUIDv4 values, so blind guessing is impractical. However, the endpoint remains vulnerable whenever those identifiers are disclosed through another channel, such as leaked links, browser history, proxy logs, shared URLs, or other application behaviors that expose internal asset references.
The issue can be reproduced by creating a private note with an attached asset, then requesting the asset download endpoint without authentication using the valid noteID and assetID. The server returns the asset content even though the associated note is private.
noteID and assetID; no authentication is required{
"cwe_ids": [
"CWE-862"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-13T19:31:57Z",
"nvd_published_at": "2026-04-17T01:17:40Z",
"severity": "MODERATE"
}