CVE-2026-42230: n8n has Open Redirect in MCP OAuth Consent Flow
n8n's MCP OAuth endpoint /mcp-oauth/register accepts client registrations with no authentication and any redirect_uri. When a user clicks Deny on the consent page, handleDeny sends them to that unchecked URL. This gives attackers an open redirect for phishing. Fixed in n8n 1.123.32, 2.17.4 and 2.18.1.
Published Apr 29, 2026 · Updated May 8, 2026 · Analysis Nov 5, 2026
What an attacker can do
The register endpoint lets anyone create an OAuth client and choose its redirect_uri. The handleDeny handler for the MCP OAuth consent dialog then redirects to the registered URI without validating it. An attacker registers a client that points at a site they control, then sends the victim a link to the consent page on the real n8n host. If the victim clicks Deny, they are silently sent to the attacker's site.
The victim needs to open the link and click, so the CVSS vector sets user interaction. The link starts on your own n8n domain, which makes the phishing page look more trustworthy. The destination can be a fake login or a page that asks for credentials. The advisory reports low confidentiality impact and no integrity or availability effect. It does not describe code execution or token theft.
Who is affected
n8n on npm below 1.123.32, from 2.0.0 below 2.17.4, and 2.18.0 below 2.18.1. The MCP OAuth endpoints must be reachable by the attacker and the victim.
npm ls n8nn8n
- Ecosystem
- npm
- Affected
- < 1.123.32
- Fixed in
- 1.123.32
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.18.0, < 2.18.1
- Fixed in
- 2.18.1
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.0.0, < 2.17.4
- Fixed in
- 2.17.4
- Check
npm ls n8n
How to fix it
Upgrade to n8n 1.123.32, 2.17.4 or 2.18.1 (or later) for your release line:
npm install -g [email protected]Short-term steps from the advisory, which do not fully remove the risk: restrict network access so untrusted users cannot reach the MCP OAuth endpoints, and limit the instance to fully trusted users.
How to tell if you were hit
Check reverse proxy and application logs for POST requests to /mcp-oauth/register from unknown clients, and for registered clients whose redirect_uri points outside your domains. Look for consent-page visits followed by redirects to external hosts. Warn staff about links to your n8n host that carry unfamiliar OAuth parameters.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
The /mcp-oauth/register endpoint accepted OAuth client registrations without authentication, allowing arbitrary redirect_uri values to be registered. When a user denies the MCP OAuth consent dialog, the handleDeny handler redirects the user to the registered redirect_uri without validation, enabling an open redirect to an attacker-controlled URL. An attacker can craft a phishing link and send it to a victim; if the victim clicks "Deny" on the consent page, they are silently redirected to an external site.
Patches
The issue has been fixed in n8n versions 1.123.32, 2.17.4, and 2.18.1. Users should upgrade to one of these versions or later to remediate the vulnerability.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations:
- Restrict network access to the n8n instance to prevent untrusted users from reaching the MCP OAuth endpoints.
- Limit access to the n8n instance to fully trusted users only.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Credited to ori-ron.
Questions
- Does CVE-2026-42230 need a login?
No. The register endpoint accepted registrations without authentication. The victim must click a link and press Deny.
- Can it steal tokens?
The advisory does not say so. It describes only a redirect to an attacker-controlled URL after the victim clicks Deny.
- Which versions are patched?
1.123.32, 2.17.4 and 2.18.1, or later in each line.
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
