fix!: authenticate MCP, send no email, no caller SQL or error leaks (v0.3.0) #14
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jlxq0/listmonk-mcp!14
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/t_9f9e27bd-audit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fleet task t_9f9e27bd. Julian asked for this directly; it remediates read-only audit t_044e460f and the security corrections he authorized during review. Classification:
What was wrong (v0.2.2, live)
campaigns:sendon the Heartbeat lists. Clark's route containment (t_0fd0bdf4) is in place./mcp/stays closed until Clark has deployed this release and proven an authorized read.update_subscriberwas always rejected by Listmonk.change_subscriber_statuswas always rejected too.update_subscribersent would have deleted every subscription.patch_subscriberchanged nothing and re-sent opt-in mail.get_subscriber_activitycrashed for every subscriber.Change
/mcp/request needsAuthorization: Bearer, checked againstLISTMONK_MCP_AUTH_TOKEN_SHA256before the session manager. The HTTP transport refuses to start without it, and there is no unauthenticated mode. A session id is not a credential./healthis open.LISTMONK_MCP_ALLOWED_HOSTSis required, for mcp 1.30's DNS-rebinding protection; without it every request gets 421. The path stays/mcp/.running/scheduled(normalised first);preconfirmand no lists, so Listmonk's opt-in hook never runs. Membership changes only throughPUT /api/subscribers/lists.*_by_querytools are removed. The email lookup usessearchinstead of building an expression.get_logsandget_import_logsare removed. Listmonk 5xx and database error text is withheld (status plus a reference only).update_setting("../campaigns/N/status")had sent a campaign. Each argument that lands in a path is also allowlisted.rename_mediarefuses (Listmonk has no endpoint for it);mcp>=1.30,<2,starlette>=1.3.1, and targeted upgrades. pip-audit finds nothing.Evidence
uv lock --checkall pass.draft;update_settingtraversal sent 15 mails before the fix and 0 after;send_campaignandchange_campaign_status(running)are refused;stop_import), fixed;For Clark (t_0fd0bdf4)
The contract is on the card:
LISTMONK_MCP_AUTH_TOKEN_SHA256(ExternalSecretsha256sum) andLISTMONK_MCP_ALLOWED_HOSTS=listmonk-mcp.hanso.group.listmonkandlistmonk_guardedentries needAuthorization: Bearer ${MCP_LISTMONK_API_KEY}.*_by_query,get_logsandget_import_logs. The send tools inlistmonk_guardedwill only refuse.campaigns:sendandsubscribers:sql_queryfromlistmonk-mcp-honoka-v2is still recommended. This server needs neither.🤖 Generated with Claude Code
https://claude.ai/code/session_01MjY9WoGT5SGnSCrYDVdiWJ