Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-45732: n8n Has a Cross-user Authorization Bypass in Dynamic Credential OAuth Endpoints

highCVSS 4.0 8.3 · 3.1 8.1GHSA-6h4j-wcr9-2vg7

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.

Published May 14, 2026 · Updated Jul 20, 2026

Affected packages

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

Advisory details

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.

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. No analysis has been written for this entry yet. Methodology

More n8n vulnerabilities

All n8n entries