Skip to main content

Note Mark CVE-2026-40265

MEDIUM
Missing Authorization (CWE-862)
2026-04-13 https://github.com/enchant97/note-mark GHSA-p5w6-75f9-cc2p
5.9
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI
5.9 MEDIUM

Network-accessible endpoint requires no authentication (AV:N/PR:N), but UUID prerequisite is a high-complexity barrier beyond attacker control (AC:H); full asset content disclosed (C:H) with no write or denial impact (I:N/A:N).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE
MEDIUM
qualitative

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

4
Source Code Evidence Fetched
Jul 24, 2026 - 08:02 vuln.today
Analysis Generated
Jul 24, 2026 - 08:02 vuln.today
Patch released
Apr 13, 2026 - 20:15 nvd
Patch available
CVE Published
Apr 13, 2026 - 19:31 nvd
MEDIUM 5.9

DescriptionGitHub Advisory

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
go
huma.Get(api, "/api/notes/{noteID}/assets/{assetID}", h.GetNoteAssetContentByID)

By contrast, other asset operations correctly apply authentication middleware. For example:

go
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:

sql
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

AnalysisAI

Unauthenticated asset disclosure in Note Mark exposes full binary contents of private note attachments to any party who possesses both the note UUID and asset UUID. The GET route at /api/notes/{noteID}/assets/{assetID} was registered without authentication middleware in handlers/assets.go, and the backend SQL query (SELECT * FROM note_assets WHERE id = ? AND note_id = ?) omits any JOIN against notes or books, meaning book ownership and visibility are never verified. No active exploitation is confirmed in CISA KEV, but a proof-of-concept exists per SSVC assessment, and the fix is available in v0.19.2.

Technical ContextAI

Note Mark is a Go-based self-hosted note-taking application (CPE: pkg:go/github.com_enchant97_note-mark_backend). The vulnerability is classified as CWE-862 (Missing Authorization). The Huma API framework routes in the Go backend selectively apply AuthRequiredMiddleware - the DELETE route for the same asset endpoint correctly wraps the handler, but the GET route was registered with a bare huma.Get() call and a developer TODO comment. The underlying service layer queries the note_assets table by id and note_id only, without joining to notes or books to verify owner_id or is_public. The fix (commit 6593898855ad) introduces an optional auth extraction via TryGetAuthDetails, then performs a COUNT query with JOIN books ON books.id = notes.book_id WHERE owner_id = ? OR is_public = ? before returning any asset, correctly enforcing both authentication and visibility semantics.

RemediationAI

Upgrade to Note Mark v0.19.2 or any later release, which includes the fix from commit 6593898855add151eb9965d96998b05e14c62026 (https://github.com/enchant97/note-mark/commit/6593898855add151eb9965d96998b05e14c62026). The patch adds optional authentication extraction to the GET asset handler and enforces an ownership/visibility check before returning asset content. See the advisory at https://github.com/enchant97/note-mark/security/advisories/GHSA-p5w6-75f9-cc2p and release notes at https://github.com/enchant97/note-mark/releases/tag/v0.19.2. If immediate patching is not feasible, operators can configure a reverse proxy (e.g., nginx, Caddy) to require authentication on GET /api/notes/*/assets/* requests - note this will also block anonymous access to assets in genuinely public books until the application-level fix is applied. Restricting network-level access to the API entirely (firewall, VPN-only) is an effective compensating control for internal-only deployments with no meaningful trade-off if external access is not required.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

Share

CVE-2026-40265 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy