CVE-2026-59207: n8n: "Allowed HTTP Request Domains" Restriction Bypass via AI Agents MCP Connector
n8n's AI Agents module ignores the "Allowed HTTP Request Domains" setting on credentials. A member with use-only access to a shared credential can point an MCP tool at a server they control and run the agent, so the credential's secret is sent there. Only instances with the agents module enabled are affected. Fixed in n8n 2.27.4 and 2.28.1.
Published Jul 22, 2026 · Analysis Oct 25, 2026
What an attacker can do
Credentials in n8n can carry an "Allowed HTTP Request Domains" list, so a secret can only be sent to approved hosts. Admins use it to let members run workflows with a shared credential without being able to send it anywhere. The AI Agents feature did not enforce that list when an agent calls an MCP tool.
The attacker is a member-level user who has been granted use-only access to a credential that has domain restrictions. They build an agent, add an MCP tool that points at a URL on a server they run, attach the shared credential and run the agent. The request carries the credential's secret, such as an API key or token, to their server. They never see the secret in the UI, but they now hold it.
That turns use-only sharing into full secret theft. The stolen secret works against the real service with its full permissions. The advisory scores confidentiality high, since the secret leaves the instance.
The flaw needs two conditions: the module is enabled through N8N_ENABLED_MODULES=agents, and at least one credential with domain restrictions is shared with a member.
Who is affected
The n8n npm package before 2.27.4, and 2.28.0 before 2.28.1. It applies only when N8N_ENABLED_MODULES includes agents and a restricted credential is shared with a member-level user.
npm ls n8nCheck the module setting with your environment or container config for N8N_ENABLED_MODULES. For Docker, check the image tag.
n8n
- Ecosystem
- npm
- Affected
- >= 2.28.0, < 2.28.1
- Fixed in
- 2.28.1
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- < 2.27.4
- Fixed in
- 2.27.4
- Check
npm ls n8n
How to fix it
Upgrade to n8n 2.27.4 or 2.28.1, or later.
npm install [email protected]Short-term mitigations from the advisory, which do not fully fix the risk:
- Remove
agentsfromN8N_ENABLED_MODULESto disable the AI Agents module. - Share credentials only with fully trusted users.
- Audit credentials that have domain restrictions for unexpected sharing.
If a restricted credential was shared with members while the module was on, consider rotating its secret.
How to tell if you were hit
Review agents and workflows that members built, and look for MCP tool nodes pointing at hosts outside your approved domains while using a restricted credential. Check egress logs from the n8n host for requests to unfamiliar domains that coincide with agent runs. Look at the sharing list of each domain-restricted credential for members who should not have it.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
The AI Agents feature did not enforce the "Allowed HTTP Request Domains" restriction configured on credentials. As a result, a member-level user who had been granted use-only access to a shared credential could cause its secret to be sent to an external server they control, by pointing an MCP tool at an arbitrary URL and running the agent.
This issue only affects instances where the AI Agents module is enabled via N8N_ENABLED_MODULES=agents and at least one credential with domain restrictions has been shared with a member-level user.
Patches
The issue has been fixed in n8n version 2.28.1 and 2.27.4. Users should upgrade to this version or later to remediate the vulnerability.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations:
- Disable the AI Agents module by removing
agentsfrom theN8N_ENABLED_MODULESenvironment variable. - Restrict credential sharing to fully trusted users only.
- Audit credentials with domain restrictions for unexpected sharing relationships.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Credited to trap-bytes.
Questions
- Am I affected if I don't use AI Agents?
Not by this flaw. The advisory says it affects only instances where the AI Agents module is enabled with
N8N_ENABLED_MODULES=agents.- What does the attacker need?
A member-level account with use-only access to a credential that has "Allowed HTTP Request Domains" set. They then point an MCP tool at their own server and run the agent.
- Which versions fix CVE-2026-59207?
n8n 2.27.4 and 2.28.1. Versions before 2.27.4, and 2.28.0, are affected.
- Should I rotate credentials?
The advisory does not say. If a restricted credential was shared with members while the module was enabled, rotating it is a sensible precaution.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More n8n vulnerabilities
All n8n entriesCVE-2026-86073
n8n: Per-Resource OAuth Consent Bypass via Unbound Refresh Token Resource Substitution
medium5.9Sep 10, 2026CVE-2026-86074
n8n: Instance AI Credential Setup Accepts Unvalidated Probe URL from Fetched Content
medium5.9Sep 10, 2026CVE-2026-86075
n8n: Unauthenticated Persistent Storage Exhaustion via OAuth Dynamic Client Registration Endpoint
high8.7Sep 10, 2026CVE-2026-86076
n8n: Expression Sandbox Escape via Class-Field Sanitizer Rebinding Can Lead to Code Execution
high8.7Sep 10, 2026CVE-2026-86077
n8n: Anonymous Approval-Gate Bypass via Reused resumeToken over the Chat WebSocket
medium6.3Sep 10, 2026CVE-2026-86078
n8n: Prototype Pollution via Workflow Structure Summary Can Lead to Denial of Service
medium6.0Sep 10, 2026
