CVE-2026-50554: Note Mark Unauthenticated Disclosure Of Soft-deleted Note Vulnerability

MODERATE
Advisory Identifier: GHSA-588f-fvcv-xhvf
CVSS 5.3
CWE-285 CWE-200
Published
Advisory Summary

CVE-2026-50554 is a MODERATE (CVSS 5.3) unauthenticated disclosure of soft-deleted note vulnerability (CWE-285: Improper Authorization) affecting Note Mark libraries in the Go ecosystem. The issue involves unauthenticated disclosure of soft-deleted note metadata via deleted=true on public books. Remediation is available by upgrading affected packages to version 0.0.0-20260601210758-9c9b72740f22.

CVE-2026-50554 at a Glance

CVE Identifier CVE-2026-50554
GHSA Identifier GHSA-588f-fvcv-xhvf
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-285: Improper Authorization
Affected Product Note Mark
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-50554

To remediate this vulnerability, upgrade all affected Note Mark dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/enchant97/note-mark/backend fixed: 0.0.0-20260601210758-9c9b72740f22
Upgrade github.com/enchant97/note-mark/backend to 0.0.0-20260601210758-9c9b72740f22
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/enchant97/note-mark/backend

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-50554, inspect your project dependencies for Note Mark:

inspect dependencies for github.com/enchant97/note-mark/backend

Analyze the terminal output to locate any version of Note Mark in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260601210758-9c9b72740f22), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Note Mark, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Summary GET /api/books/{bookID}/notes is an unauthenticated endpoint that accepts a "deleted" query parameter. When the request is ?deleted=true, the service runs the query with Unscoped() (bypassing GORM's soft-delete scope) but keeps the read-authorization clause as "owner_id = ? OR is_public = ?". As a result, any unauthenticated caller can enumerate the metadata of soft-deleted ("trashed") notes belonging to any public book — notes the owner explicitly deleted and expected to be removed from public view. Affected component (code-verified) backend/services/notes.go — GetNotesByBookID (lines 72-89): func (s NotesService) GetNotesByBookID(currentUserID *uuid.UUID, bookID uuid.UUID, deleted bool) ([]db.Note, error) { tx := db.DB if deleted { tx = tx.Unscoped() // <-- bypasses soft-delete scope } tx = tx. Preload("Book"). Joins("JOIN books ON books.id = notes.book_id"). Where( db.DB.Where("books.id = ?", bookID), db.DB.Where("owner_id = ? OR is_public = ?", currentUserID, true), // <-- is_public still honored for trash ) if deleted { tx = tx.Where("notes.deleted_at IS NOT NULL") } var notes []db.Note return notes, dbErrorToServiceError(tx.Find(&notes).Error) } Route registration confirms the endpoint has no AuthRequiredMiddleware (backend/handlers/notes.go:37), and the deleted flag is attacker-controlled (backend/handlers/notes.go:86 — Deleted bool with query:"deleted"). Proof of concept 1. A victim owns a public book (is_public = true), creates a note, then soft-deletes it (moves it to trash). The note still exists in the DB with deleted_at set. 2. An unauthenticated attacker who knows (or enumerates) the book UUID requests: GET /api/books/<bookID>/notes?deleted=true 3. The response lists the soft-deleted note(s) — id, title, slug, timestamps — even though the attacker is not authenticated and the owner intended the note to be deleted. Impact Exposure of soft-deleted note metadata (title, slug, timestamps) of public books to unauthenticated actors. The note body is not exposed — the content endpoint (GetNoteContent) does not use Unscoped(), so its count query returns 0 for soft-deleted notes and yields 404. Impact is therefore limited to metadata disclosure and the bypass of the intended "delete" semantics on public books. Remediation Restrict trash (soft-deleted) listings to the book owner only — never honor the is_public branch when deleted=true: func (s NotesService) GetNotesByBookID(currentUserID *uuid.UUID, bookID uuid.UUID, deleted bool) ([]db.Note, error) { tx := db.DB if deleted { tx = tx.Unscoped() } + // Soft-deleted ("trash") notes must only ever be listed to the book owner. + authz := db.DB.Where("owner_id = ? OR is_public = ?", currentUserID, true) + if deleted { + authz = db.DB.Where("owner_id = ?", currentUserID) + } tx = tx. Preload("Book"). Joins("JOIN books ON books.id = notes.book_id"). Where( db.DB.Where("books.id = ?", bookID), - db.DB.Where("owner_id = ? OR is_public = ?", currentUserID, true), + authz, ) if deleted { tx = tx.Where("notes.deleted_at IS NOT NULL") } var notes []db.Note return notes, dbErrorToServiceError(tx.Find(&notes).Error) } With this change, when currentUserID is nil (unauthenticated) and deleted=true, the clause becomes owner_id = NULL, which matches nothing — so trash is never exposed to anonymous callers. Coordinated disclosure / CVE request We have reported this privately and are happy to assist with any further validation or testing you need. If you agree this qualifies as a security vulnerability, we would be grateful if you could request a CVE ID for it — GitHub lets maintainers request a CVE directly from this advisory page once it is accepted. Thank you for your time and for maintaining note-mark. References - CWE-200: Exposure of Sensitive Information to an Unauthorized Actor - CWE-285: Improper Authorization - Prior note-mark authorization fix (CVE-2026-40265) established that read paths must scope by owner_id OR is_public; this report covers the trash path that the scope did not fully cover. ---

CVE-2026-50554 Affected Note Mark Versions

1 component(s)
Fixed Versions:
0.0.0-20260601210758-9c9b72740f22
Product / Package Ecosystem Affected Versions Fixed Version
github.com/enchant97/note-mark/backend
Go
< 0.0.0-20260601210758-9c9b72740f22
0.0.0-20260601210758-9c9b72740f22

References

Frequently Asked Questions

What is CVE-2026-50554?
CVE-2026-50554 is a security vulnerability in Note Mark involving Unauthenticated disclosure of soft-deleted note metadata via deleted=true on public books under CWE-285: Improper Authorization.
Which Note Mark versions are affected?
Affected versions include releases prior to 0.0.0-20260601210758-9c9b72740f22 across affected packages: github.com/enchant97/note-mark/backend.
What version fixes CVE-2026-50554?
Upgrading to 0.0.0-20260601210758-9c9b72740f22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/enchant97/note-mark/backend affected?
Yes, github.com/enchant97/note-mark/backend is affected in releases prior to 0.0.0-20260601210758-9c9b72740f22. Upgrade your dependency to 0.0.0-20260601210758-9c9b72740f22 or later.
What is the CVSS score of CVE-2026-50554?
CVE-2026-50554 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-50554?
CVE-2026-50554 is classified under CWE-285: Improper Authorization (The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-50554?
Run the dependency tree command: 'inspect dependencies for github.com/enchant97/note-mark/backend'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-588f-fvcv-xhvf",
  "modified" : "2026-07-09T13:41:29Z",
  "published" : "2026-07-09T13:41:29Z",
  "aliases" : [ "CVE-2026-50554" ],
  "summary" : "Note Mark: Unauthenticated disclosure of soft-deleted note metadata via deleted=true on public books",
  "details" : "Summary\n\n  GET /api/books/{bookID}/notes is an unauthenticated endpoint that accepts a \"deleted\" query parameter. When the request is ?deleted=true, the\n  service runs the query with Unscoped() (bypassing GORM's soft-delete scope) but keeps the read-authorization clause as \"owner_id = ? OR is_public\n  = ?\". As a result, any unauthenticated caller can enumerate the metadata of soft-deleted (\"trashed\") notes belonging to any public book — notes\n  the owner explicitly deleted and expected to be removed from public view.\n\n  Affected component (code-verified)\n\n  backend/services/notes.go — GetNotesByBookID (lines 72-89):\n\n  func (s NotesService) GetNotesByBookID(currentUserID *uuid.UUID, bookID uuid.UUID, deleted bool) ([]db.Note, error) {\n        tx := db.DB\n        if deleted {\n                tx = tx.Unscoped() // <-- bypasses soft-delete scope\n        }\n        tx = tx.\n                Preload(\"Book\").\n                Joins(\"JOIN books ON books.id = notes.book_id\").\n                Where(\n                        db.DB.Where(\"books.id = ?\", bookID),\n                        db.DB.Where(\"owner_id = ? OR is_public = ?\", currentUserID, true), // <-- is_public still honored for trash\n                )\n        if deleted {\n                tx = tx.Where(\"notes.deleted_at IS NOT NULL\")\n        }\n        var notes []db.Note\n        return notes, dbErrorToServiceError(tx.Find(&notes).Error)\n  }\n\n  Route registration confirms the endpoint has no AuthRequiredMiddleware (backend/handlers/notes.go:37), and the deleted flag is attacker-controlled\n   (backend/handlers/notes.go:86 — Deleted bool with query:\"deleted\").\n\n  Proof of concept\n\n  1. A victim owns a public book (is_public = true), creates a note, then soft-deletes it (moves it to trash). The note still exists in the DB with\n  deleted_at set.\n  2. An unauthenticated attacker who knows (or enumerates) the book UUID requests: GET /api/books/<bookID>/notes?deleted=true\n  3. The response lists the soft-deleted note(s) — id, title, slug, timestamps — even though the attacker is not authenticated and the owner\n  intended the note to be deleted.\n\n  Impact\n\n  Exposure of soft-deleted note metadata (title, slug, timestamps) of public books to unauthenticated actors. The note body is not exposed — the\n  content endpoint (GetNoteContent) does not use Unscoped(), so its count query returns 0 for soft-deleted notes and yields 404. Impact is therefore\n   limited to metadata disclosure and the bypass of the intended \"delete\" semantics on public books.\n\n  Remediation\n\n  Restrict trash (soft-deleted) listings to the book owner only — never honor the is_public branch when deleted=true:\n\n   func (s NotesService) GetNotesByBookID(currentUserID *uuid.UUID, bookID uuid.UUID, deleted bool) ([]db.Note, error) {\n        tx := db.DB\n        if deleted {\n                tx = tx.Unscoped()\n        }\n  +     // Soft-deleted (\"trash\") notes must only ever be listed to the book owner.\n  +     authz := db.DB.Where(\"owner_id = ? OR is_public = ?\", currentUserID, true)\n  +     if deleted {\n  +             authz = db.DB.Where(\"owner_id = ?\", currentUserID)\n  +     }\n        tx = tx.\n                Preload(\"Book\").\n                Joins(\"JOIN books ON books.id = notes.book_id\").\n                Where(\n                        db.DB.Where(\"books.id = ?\", bookID),\n  -                     db.DB.Where(\"owner_id = ? OR is_public = ?\", currentUserID, true),\n  +                     authz,\n                )\n        if deleted {\n                tx = tx.Where(\"notes.deleted_at IS NOT NULL\")\n        }\n        var notes []db.Note\n        return notes, dbErrorToServiceError(tx.Find(&notes).Error)\n   }\n\n  With this change, when currentUserID is nil (unauthenticated) and deleted=true, the clause becomes owner_id = NULL, which matches nothing — so\n  trash is never exposed to anonymous callers.\n\n  Coordinated disclosure / CVE request\n\n  We have reported this privately and are happy to assist with any further validation or testing you need. If you agree this qualifies as a security\n   vulnerability, we would be grateful if you could request a CVE ID for it — GitHub lets maintainers request a CVE directly from this advisory page\n   once it is accepted. Thank you for your time and for maintaining note-mark.\n\n  References\n\n  - CWE-200: Exposure of Sensitive Information to an Unauthorized Actor\n  - CWE-285: Improper Authorization\n  - Prior note-mark authorization fix (CVE-2026-40265) established that read paths must scope by owner_id OR is_public; this report covers the trash\n   path that the scope did not fully cover.\n\n  ---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/enchant97/note-mark/backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260601210758-9c9b72740f22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/enchant97/note-mark/security/advisories/GHSA-588f-fvcv-xhvf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/enchant97/note-mark/commit/9c9b72740f22a06131a8f64b53bb08e3b05b81a6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/enchant97/note-mark"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-285" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-09T13:41:29Z",
    "nvd_published_at" : null
  }
}