CVE-2026-40265
JSON

5.9medium

Note Mark has Broken Access Control on Asset Download

Severity
5.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.45% (higher than 40% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-p5w6-75f9-cc2pGO-2026-5530

Description

Note Mark is an open-source note-taking application. In versions 0.19.1 and prior, the asset download endpoint at /api/notes/{noteID}/assets/{assetID} is registered without authentication middleware, and the backend query does not verify ownership or book visibility. An unauthenticated user who knows a valid note ID and asset ID can retrieve the full contents of private note assets without authentication, regardless of whether the associated book is public or private. This issue has been fixed in version 0.19.2.

Affected

Product or packageVersionsReported by
enchant97 note-mark< 0.19.2CVE List
github.com/enchant97/note-mark/backend (Go)before 0.0.0-20260411145023-6593898855adGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-862

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Note Mark is an open-source note-taking application. In versions 0.19.1 and prior, the asset download endpoint at /api/notes/{noteID}/assets/{assetID} is registered without authentication middleware, and the backend query does not verify ownership or book visibility. An unauthenticated user who knows a valid note ID and asset ID can retrieve the full contents of private note assets without authentication, regardless of whether the associated book is public or private. This issue has been fixed in version 0.19.2.

GitHub Advisory Database
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 noteID and assetID; no authentication is required
  • Attack complexity: High, because successful exploitation depends on prior disclosure of both UUIDs rather than feasible online guessing
Go Vulnerability Database

Note Mark has Broken Access Control on Asset Download in github.com/enchant97/note-mark/backend

NVD (es)

Note Mark es una aplicación de código abierto para tomar notas. En las versiones 0.19.1 y anteriores, el endpoint de descarga de activos en /api/notes/{noteID}/assets/{assetID} está registrado sin middleware de autenticación, y la consulta del backend no verifica la propiedad o la visibilidad del libro. Un usuario no autenticado que conoce un ID de nota y un ID de activo válidos puede recuperar el contenido completo de activos de notas privadas sin autenticación, independientemente de si el libro asociado es público o privado. Este problema ha sido solucionado en la versión 0.19.2.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-40265 changed 2026-04-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-p5w6-75f9-cc2p changed 2026-06-25CC-BY-4.0
Go Vulnerability DatabaseGO-2026-5530 changed 2026-06-25CC-BY-4.0
NVDCVE-2026-40265 changed 2026-10-26Public domain