You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security(mcp): find_documents and count_documents can read system.* collections that list_collections hides #1774
`McpMongoService.listCollections` drops names starting with `system.`, but `_knownCollection`, which validates the collection of `find_documents` and `count_documents`, checks against the unfiltered `session.listCollections()`. A client can name `system.profile` (past queries with their literals), `system.views` or any `system.*` collection of the connection's database even though it is hidden from the list.
Fix
Apply the same `system.` filter in `_knownCollection` (one helper used by both). Test: `find` and `count` on `system.profile` are refused with the same message as an unknown collection.
Found in the MCP review (see #1769 for the SQL guard).
Activity
Merge pull request #1784 from QueryaHub/fix/mcp-system-collections-an…
ZhuchkaTriplesix commentedon Oct 25, 2026
Fixed on dev in #1784 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.