AAK-MCP-N8N-CVE-2026-65594-001: n8n MCP Server Trigger OAuth workflow-authorization bypass (from 2.27.0 below 2.29.8, from 2.30.0 below 2.30.1)
- Severity
- HIGH
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
N8nMcpOAuthWorkflowAuthzBypass
What it detects
n8n before 2.29.8 (and the 2.30.x line before 2.30.1), affected from 2.27.0 when the OAuth 2.1 consent / token-issuance flow was introduced, does not verify that the authenticated user has access to the workflow referenced as the OAuth resource. On an instance with an active MCP Server Trigger workflow using n8n OAuth2 auth, a member-level user can register an OAuth client, self-approve consent for another user's workflow, and obtain a valid token; the workflow then runs in the owner's project with the owner's stored credentials, breaking user/project isolation (CVE-2026-65594). This is a distinct fix line from n8n's 2.27.4 / 2.28.1 fix for an earlier MCP credential-domain bypass, so it has its own rule. Treat 2.27.0–2.29.7 and 2.30.0 as exposed.
How to fix
Upgrade n8n to >= 2.29.8 (or >= 2.30.1 on the 2.30.x line) and pin it. Ensure the MCP Server Trigger OAuth consent/token flow verifies the authenticated user's access to the referenced workflow before issuing a token.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-N8N-CVE-2026-65594-001
Limitations
Reads n8n in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, reporting a range that admits an affected version and a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json) or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). A compose file's n8nio/n8n image tag is not read. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-65594
- OWASP MCP Top 10: MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering), MCP07:2025 (Insufficient Authentication & Authorization)
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-01 (Missing Authentication)
- CSA AI Controls Matrix (AICM): IAM-01, IAM-16, STA-08
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-MCP-N8N-CVE-2026-65594-001.md: the page then shows that text, with the registry reference appended under it.