-
Notifications
You must be signed in to change notification settings - Fork 2
fix(mcp): unbounded elicitation mpsc channel allows memory exhaustion #2524
Copy link
Copy link
Closed
Labels
P3Research — medium-high complexityResearch — medium-high complexitybugSomething isn't workingSomething isn't workingmemoryzeph-memory crate (SQLite)zeph-memory crate (SQLite)securitySecurity-related issueSecurity-related issue
Description
Context
Added in #2521. The elicitation_tx channel in McpClient is unbounded (tokio::sync::mpsc::unbounded_channel). A malicious or misbehaving MCP server can flood elicitation requests, exhausting memory.
Required work
- Replace with a bounded channel (e.g., capacity 16)
- On send failure (channel full): log a warning and auto-decline the request server-side
- Config:
[mcp] elicitation_queue_capacity = 16(optional)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Research — medium-high complexityResearch — medium-high complexitybugSomething isn't workingSomething isn't workingmemoryzeph-memory crate (SQLite)zeph-memory crate (SQLite)securitySecurity-related issueSecurity-related issue