Skip to content

Bug/DoS: append_journal has no size or count limits #2

Description

@dkritarth

src/mcp/tools.ts handleAppendJournal validates note/server are non-empty strings and tags is string array, but no cap on:

  • note length
  • number of tags / tag length
  • server field length

A held write token (or compromised agent) can write unbounded-size entries, inflating KV storage cost and journal:index size indefinitely. Suggest adding sane max lengths (e.g. note <= 10000 chars, tags <= 20 items) enforced in handleAppendJournal before appendJournalEntry is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions