CVE-2026-45732: n8n Has a Cross-user Authorization Bypass in Dynamic Credential OAuth Endpoints
n8n's OAuth1 and OAuth2 credential reconnect endpoints checked `credential:read` instead of `credential:update`. A user with read-only access to a shared credential could reconnect it to an external account they control, replacing the stored tokens. Fixed in n8n 1.123.43, 2.20.7 and 2.21.1.
Published May 14, 2026 · Updated Jul 20, 2026 · Analysis Oct 27, 2026
What an attacker can do
The reconnect endpoints for OAuth1 and OAuth2 credentials authorized with the read scope. Read access to a credential is enough to start the flow. The attacker completes the OAuth consent with their own external account, and n8n overwrites the stored token material with tokens bound to that account.
From then on, every workflow that uses the credential runs as the attacker's OAuth identity. A workflow that writes rows to a spreadsheet, sends mail or uploads files now sends that data to the attacker's account. That gives data exfiltration to attacker-controlled services and a persistent takeover of the shared integration (CWE-639). The attacker does not need to change workflows.
The flaw only matters where credentials are shared with other users or across projects. The attacker needs an authenticated account with read access to the credential and no user interaction from the owner. The CVSS 3.1 vector has the attacker needing only low privileges, with high integrity impact. Teams that share a Google, Slack or Microsoft credential with many viewers are the main target.
Who is affected
n8n before 1.123.43 on the 1.x line, 2.0.0-rc.0 up to before 2.20.7, and 2.21.0 before 2.21.1 are affected. Instances where no credential is shared have no read-only second user, so they have little exposure.
Check the version:
npm ls n8nFor Docker, check the image tag, or find the version in the n8n UI under Help and About.
n8n
- Ecosystem
- npm
- Affected
- < 1.123.43
- Fixed in
- 1.123.43
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.21.0, < 2.21.1
- Fixed in
- 2.21.1
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.0.0-rc.0, < 2.20.7
- Fixed in
- 2.20.7
- Check
npm ls n8n
How to fix it
Upgrade to n8n 1.123.43, 2.20.7 or 2.21.1, or later:
npm install -g [email protected]For Docker, pull a patched image tag and recreate the container. Use the patched release for your line.
If you cannot upgrade yet, restrict credential sharing to fully trusted users and audit shared credentials for unexpected OAuth token changes. Revoke any tokens that may have been replaced. The advisory says these steps do not fully remove the risk.
How to tell if you were hit
Review shared OAuth credentials for token changes you did not make. Check the connected account name or email on each shared OAuth credential, and compare it with the account you expect.
Look at the provider side too: new OAuth grants from unfamiliar accounts, and workflow outputs, such as files or messages, landing in accounts outside your organization. Check n8n logs for calls to the OAuth reconnect endpoints made by users who only have read access.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
The OAuth1 and OAuth2 credential reconnect endpoints authorized access using credential:read rather than credential:update. An authenticated user with read-only access to a shared credential could initiate an OAuth reconnect flow and overwrite the stored token material for that credential with tokens bound to an external account they control. Workflows relying on the affected credential would subsequently execute under the attacker's OAuth identity, enabling data exfiltration to attacker-controlled external services and persistent takeover of shared integrations.
This issue affects instances where credentials are shared with other users or across projects.
Patches
The issue has been fixed in n8n versions 1.123.43, 2.20.7, and 2.21.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 credential sharing to fully trusted users only.
- Audit shared credentials for unexpected OAuth token changes and revoke any tokens that may have been replaced.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
--- n8n has adopted CVSS 4.0 as primary score for all security advisories. CVSS 3.1 vector strings are provided for backwards compatibility.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
Credited to nkoorty, jjjutla.
Questions
- Which n8n versions fix the OAuth reconnect authorization bypass?
1.123.43, 2.20.7 and 2.21.1. Use the one on your release line, or any later version.
- Who is at risk from this n8n flaw?
Instances that share credentials with other users or across projects. A user with read-only access to a shared OAuth credential can replace its tokens.
- Is there a workaround?
Only partial. Limit credential sharing to trusted users, audit shared credentials for token changes and revoke replaced tokens. The advisory says these do not fully fix the risk.
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
