Skip to content

AAK-MCP-N8N-CVE-2026-126386-001: n8n 1.120.0 to 1.123.88, 2.x below 2.45.5 and 2.46.0 (MCP OAuth open redirect, Browser Use upload tool reads the server's files)

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
N8nMcpOAuthRedirectBrowserUploadRead

What it detects

Two MCP-surface flaws in n8n (npm), fixed in the same releases and carried by one pin. n8n's MCP server registers OAuth clients at /mcp-oauth/register without authentication and with any redirect_uri, and /mcp-oauth/authorize sent the visitor to that URI before the authorization request was checked, so a crafted link on the instance's own host lands on an attacker's site (CVE-2026-126386, CVSS 3.1 4.7, GHSA-rc3w-8jc8-7x3w). With Browser Use on, n8n's Instance AI assistant drives a member's browser through @n8n/mcp-browser tools that n8n serves as a local MCP server, and their browser_upload tool took absolute paths that Playwright resolved on the n8n server, so a member could have any file the n8n process reads, its configuration included, put into the page the assistant drives (CVE-2026-126387, CVSS 3.1 5.3, GHSA-9qx8-fhxv-w794). Read in the npm releases: the MCP OAuth endpoints first ship in 1.120.0 and Browser Use in 2.29.0; the authorization-request check (authorizationRequestValidator) is absent at 1.120.0, 1.123.88, 2.0.0, 2.41.4, 2.45.4 and 2.46.0 and present at 1.123.89, 2.45.5 and 2.46.1; n8n pins @n8n/mcp-browser 0.12.0 at 2.29.0 and 0.25.0 at 2.45.4 and 2.46.0, which list browser_upload in remote mode, and 0.25.1 at 2.45.5 and 2.46.1, which leaves it out there.

How to fix

Upgrade n8n to 2.45.5 or later and pin it, or to 2.46.1 or later on the 2.46.x line (2.46.0 is newer than 2.45.5 and still affected), or to 1.123.89 on 1.x. Until then, block unauthenticated requests to /mcp-oauth/register and /mcp-oauth/authorize at the reverse proxy, and leave Browser Use off (N8N_INSTANCE_AI_BROWSER_USE_ENABLED unset or false).

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

agent-audit-kit scan . --rules AAK-MCP-N8N-CVE-2026-126386-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, so ^2.45.5, which admits 2.46.0, is reported. Only a stated version is reported: latest was 2.47.7 on 2026-11-14, a fixed release. Releases below 1.120.0 are not reported, though both records start at the first release: they have neither the MCP OAuth endpoints nor Browser Use. 1.120.0 to 1.123.88 and 2.0.0 to 2.28.x carry only the open redirect. The rule reads the version, not whether MCP access or Browser Use is turned on: 1.123.88 answers the OAuth endpoints only while MCP access is enabled, and Browser Use needs N8N_INSTANCE_AI_BROWSER_USE_ENABLED=true. npm has no 3.x release, so the records' 3.0.0 is not reported. 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 or docker.n8n.io/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-126386, CVE-2026-126387
  • OWASP MCP Top 10: MCP07:2025 (Insufficient Authentication & Authorization), MCP10:2025 (Context Injection & Over-Sharing), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
  • OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation), ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
  • Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-01 (Missing Authentication), ADV-INJECT-06 (Tool Param Path Traversal)
  • CSA AI Controls Matrix (AICM): IAM-01, AIS-07, 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-126386-001.md: the page then shows that text, with the registry reference appended under it.