Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-p5w6-75f9-cc2p
No affected components available
Summary
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.
Details
The issue is caused by the asset download route being registered without authentication middleware.
Relevant route registration:
handlers/assets.go, line 40
huma.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:
- whether the requester owns the parent book
- whether the parent book is public or private
- whether the related note has been deleted
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.
PoC
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.
Impact
- Type: Broken access control / unauthenticated information disclosure
- Who is impacted: Any deployment exposing the affected asset download endpoint
- Security impact: Full binary contents of private note assets can be disclosed to unauthenticated users who know the required identifiers
- Attack preconditions: The attacker must know both the target
noteIDandassetID; no authentication is required - Attack complexity: High, because successful exploitation depends on prior disclosure of both UUIDs rather than feasible online guessing
The vulnerability can be exploited over the network without needing physical access. It is difficult for an attacker to exploit this vulnerability and may require special conditions. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard