CVE-2026-126386: n8n: open redirect in MCP OAuth enables phishing
MEDIUMn8n has an open redirect flaw in its unauthenticated MCP OAuth dynamic client registration flow: the /mcp-oauth/register endpoint accepts arbitrary redirect_uri values, so a crafted /mcp-oauth/authorize link can send a victim to an attacker-controlled site before any instance checks run. The CVSS score is a moderate 4.7, and there is no KEV listing, no public exploit, no Nuclei template and no EPSS data, so mass exploitation is not indicated today. The risk is still real for organizations that expose n8n to the internet. A link on your own trusted n8n domain makes phishing credible, and n8n often holds credentials for the AI agents and SaaS systems it orchestrates. Patch to 1.123.89, 2.45.5, 2.46.1 or 3.0.1 (or later), and if you cannot patch promptly, restrict access to the /mcp-oauth/* endpoints.
What is the risk?
Medium. The endpoint is reachable over the network without authentication, and the attack is low complexity, but the victim has to click a crafted link (UI:R). The scope is changed (S:C) and only integrity is affected, at a low level. There are no signs of active exploitation: no KEV entry, no public exploit, no scanner template and no EPSS data. The main exposure is internet-facing n8n instances with MCP OAuth enabled, where the legitimate domain lends the phishing link credibility.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
Do you use n8n? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade n8n to 1.123.89, 2.45.5, 2.46.1, 3.0.1 or later. 2) If you cannot patch immediately, block or restrict /mcp-oauth/register and /mcp-oauth/authorize at the reverse proxy or WAF, or limit access to trusted networks or a VPN. 3) Detect abuse by reviewing proxy and access logs for /mcp-oauth/register calls with unexpected redirect_uri hosts and for /mcp-oauth/authorize requests that carry external redirect targets. 4) Tell users to treat unsolicited n8n links with caution, and review OAuth clients that were registered dynamically.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-126386?
n8n has an open redirect flaw in its unauthenticated MCP OAuth dynamic client registration flow: the /mcp-oauth/register endpoint accepts arbitrary redirect_uri values, so a crafted /mcp-oauth/authorize link can send a victim to an attacker-controlled site before any instance checks run. The CVSS score is a moderate 4.7, and there is no KEV listing, no public exploit, no Nuclei template and no EPSS data, so mass exploitation is not indicated today. The risk is still real for organizations that expose n8n to the internet. A link on your own trusted n8n domain makes phishing credible, and n8n often holds credentials for the AI agents and SaaS systems it orchestrates. Patch to 1.123.89, 2.45.5, 2.46.1 or 3.0.1 (or later), and if you cannot patch promptly, restrict access to the /mcp-oauth/* endpoints.
Is CVE-2026-126386 actively exploited?
No confirmed active exploitation of CVE-2026-126386 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-126386?
1) Upgrade n8n to 1.123.89, 2.45.5, 2.46.1, 3.0.1 or later. 2) If you cannot patch immediately, block or restrict /mcp-oauth/register and /mcp-oauth/authorize at the reverse proxy or WAF, or limit access to trusted networks or a VPN. 3) Detect abuse by reviewing proxy and access logs for /mcp-oauth/register calls with unexpected redirect_uri hosts and for /mcp-oauth/authorize requests that carry external redirect targets. 4) Tell users to treat unsolicited n8n links with caution, and review OAuth clients that were registered dynamically.
What systems are affected by CVE-2026-126386?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, workflow automation platforms, MCP server integrations, OAuth-integrated AI agent tooling.
What is the CVSS score for CVE-2026-126386?
CVE-2026-126386 has a CVSS v3.1 base score of 4.7 (MEDIUM).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011.003Malicious LinkAML.T0049Exploit Public-Facing ApplicationAML.T0052PhishingCompliance Controls Affected
What are the technical details?
Original Advisory
n8n before 1.123.89, 2.x before 2.45.5, 2.46.x before 2.46.1, and 3.x before 3.0.1 contains an open redirect vulnerability in the unauthenticated MCP OAuth dynamic client registration flow, which accepts arbitrary redirect_uri values via the /mcp-oauth/register endpoint. Attackers can send victims crafted /mcp-oauth/authorize URLs that redirect them to attacker-controlled sites before instance checks run, enabling phishing.
Exploitation Scenario
An attacker registers an OAuth client through the unauthenticated /mcp-oauth/register endpoint with a redirect_uri pointing to a domain they control. They then send employees who use the company n8n instance a crafted /mcp-oauth/authorize link, for example in a message about an agent workflow or MCP integration. The link starts on the legitimate n8n domain, so it looks trustworthy. Before the instance checks run, the victim is redirected to a lookalike login or consent page, where the attacker harvests credentials, MFA codes or OAuth approvals tied to AI agent and automation services.
Weaknesses (CWE)
CWE-601 — URL Redirection to Untrusted Site: The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] Use an intermediate disclaimer page that provides the user with a clear warning that they are leaving the current site. Implement a long timeout before the redirect occurs, or force the user to click on the link. Be careful to avoid XSS problems (CWE-79) when generating the disclaimer page.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:NReferences
Timeline
Related Vulnerabilities
CVE-2026-3366310.0n8n: member role steals plaintext HTTP credentials
Same package: n8nCVE-2026-3366010.0TensorFlow: type confusion NPD in tensor conversion
Same package: n8nCVE-2026-2185810.0n8n: Input Validation flaw enables exploitation
Same package: n8nCVE-2026-274949.9n8n: security flaw enables exploitation
Same package: n8nCVE-2026-274959.9n8n: Code Injection enables RCE
Same package: n8n