CVE-2026-50554

CVE-2026-50554 is a medium-severity security vulnerability in github.com/enchant97/note-mark/backend (go), affecting versions < 0.0.0-20260601210758-9c9b72740f22. It is fixed in 0.0.0-20260601210758-9c9b72740f22.

Check whether CVE-2026-50554 affects your applications

Kodem tells you whether this CVE is present, reachable, and actually executing in your application, so you know if it matters.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence. Only the CVEs that actually run in production.

Summary

Note Mark: Unauthenticated disclosure of soft-deleted note metadata via deleted=true on public books

Full technical description

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//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.

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.

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.

CVE-2026-50554 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260601210758-9c9b72740f22); upgrading removes the vulnerable code path.

Affected versions

github.com/enchant97/note-mark/backend (< 0.0.0-20260601210758-9c9b72740f22)

Security releases

github.com/enchant97/note-mark/backend → 0.0.0-20260601210758-9c9b72740f22 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-50554? CVE-2026-50554 is a medium-severity security vulnerability in github.com/enchant97/note-mark/backend (go), affecting versions < 0.0.0-20260601210758-9c9b72740f22. It is fixed in 0.0.0-20260601210758-9c9b72740f22.
  2. How severe is CVE-2026-50554? CVE-2026-50554 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/enchant97/note-mark/backend are affected by CVE-2026-50554? github.com/enchant97/note-mark/backend (go) versions < 0.0.0-20260601210758-9c9b72740f22 is affected.
  4. Is there a fix for CVE-2026-50554? Yes. CVE-2026-50554 is fixed in 0.0.0-20260601210758-9c9b72740f22. Upgrade to this version or later.
  5. Is CVE-2026-50554 exploitable, and should I be worried? Whether CVE-2026-50554 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-50554 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-50554? Upgrade github.com/enchant97/note-mark/backend to 0.0.0-20260601210758-9c9b72740f22 or later.

Other vulnerabilities in github.com/enchant97/note-mark/backend

Stop the waste.
Protect your environment with Kodem.