Skip to content

AAK-TASKS-001: MCP task read endpoint lacks per-task authorization

Severity
HIGH
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_tasks.py
Auto-fixable
No.
SARIF name
TasksNoOwnerCheck

What it detects

A task read endpoint returns task state based on the task ID alone. Any caller that guesses or enumerates a task ID gets another user's data (CWE-639).

How to fix

Verify the caller is the task owner (or has an explicit grant) before returning task state.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-TASKS-001

Limitations

Reads only files that contain a task marker: task_id, a class whose name contains Task, Task or task directly followed by Manager, Store, Queue, Runner, Primitive or SEP-1686 (TaskStore), or /tasks/{, /tasks/: or /tasks/<. In them it looks for a Python def named get_task, read_task, task_read, get_by_id or findTask and clears it when one of the whole words owner, requesting_user, current_user, authenticated_user, principal, tenant_id or caller_id (any case; owner_id does not count) appears in the next 1200 characters. A TypeScript or JavaScript handler (async function getTask) and a file with no task marker are not matched, and the word owner counts even when the function only returns it.

References

  • OWASP MCP Top 10: MCP07:2025 (Insufficient Authentication & Authorization), MCP10:2025 (Context Injection & Over-Sharing)
  • OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-TASKS-01

All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-TASKS-001.md: the page then shows that text, with the registry reference appended under it.