| タイトル | n8n-io n8n <=2.46.6 Improper Authorization |
|---|
| 説明 | n8n Agents support human-in-the-loop (HITL) approval for sensitive tool calls: when an agent wants to run a gated action, an approval card is posted to the connected Slack/Discord/Telegram channel and execution pauses until someone clicks "Approve".
The clicking user is never authorized. For Slack, Discord and Telegram the approval card is delivered to the whole channel, and the resume handler executes the gated action for whoever clicks it, with no check that the clicker is the user whose approval was requested and no approver allowlist.
Root cause (verified at tag [email protected], commit bb72d756104542adb549b6966a57e21459bd52a2):
- packages/cli/src/modules/agents/integrations/agent-chat-integration.ts: targetSuspensionCardAtActingUser defaults to false (code comment: "Delivery-scoped only: nothing verifies who clicks."). Only the Teams integration enables targeting.
- packages/cli/src/modules/agents/integrations/agent-chat-hitl-resume-handler.ts: handleAction() resumes the run for event.user with no verification that the clicker is the requester/owner.
- The only per-user gate (canUserAccess -> isUserAllowed in agent-chat-bridge.ts) is a channel-membership allowlist that defaults to allow and is implemented only for Telegram private mode; it does not bind an approval to the requester.
Impact: approval-gated agent actions execute without any authorized human approval. An attacker who is a member of the channel - including someone who prompt-injected the agent into proposing a malicious action - can approve it themselves. The action then runs with the agent's project credentials (data exfiltration, message sending, state mutation, depending on the tools the agent exposes). Related: session-scoped approvals are keyed on action name only, not target, so one "approve for session" on e.g. send_dm covers later send_dm calls to other recipients.
Proof of concept (live, reproduced end-to-end on n8nio/n8n:2.46.6 and 2.42.0): a published agent with a Slack integration is seeded with a suspended approval for user U_REQUESTER01's session. A validly-signed Slack block_actions interaction is then submitted claiming to be a different user, U_ATTACKER99, clicking Approve. Observed: HTTP 200, the checkpoint is consumed, and a new agent_execution row records hitlStatus=resumed with the attacker-supplied decision {"approved":true}. A replayed click produces no second execution (the approval was already consumed).
CWE-862 (Missing Authorization). CVSS 4.0 base 8.3 (High): CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N.
Distinct from GHSA-p3pg-xw4f-m72c (agent REST resume-endpoint ownership, fixed 2.42.0) and GHSA-728h-pmr2-7cgh (Send-and-Wait HMAC bypass, fixed 2.42.1): this concerns the platform-integration approval-card path, which neither advisory covers, and which remains present in the current 2.46.6 release.
Remediation: bind each approval to the platform identity whose turn raised it (store the expected approver in the checkpoint and verify it in handleAction), or support an explicit per-agent approver allowlist; enable acting-user-targeted (ephemeral) card delivery for Slack and Discord; scope "approve for session" by action and target.
Tested exclusively against a local, self-hosted instance per n8n's VDP testing guidelines; no cloud or third-party assets were touched. |
|---|
| ユーザー | Chamal Bandara (UID 102762) |
|---|
| 送信 | 2026年11月04日 22:17 (28 日 ago) |
|---|
| モデレーション | 2026年12月02日 11:40 (28 days later) |
|---|
| ステータス | 承諾済み |
|---|
| VulDBエントリ | 447694 [n8n-io n8n 迄 2.50.5 Agent agent-chat-hitl-resume-handler.ts handleAction 特権昇格] |
|---|
| ポイント | 17 |
|---|