CVE-2026-86073: n8n: Per-Resource OAuth Consent Bypass via Unbound Refresh Token Resource Substitution
n8n's built-in OAuth server bound the first access token to the resource a user consented to, but not the refresh token. An OAuth client approved for one workflow could refresh with another workflow's URL and get a valid token for it. Fixed in n8n 2.38.1 and 2.37.7. Medium severity (CVSS 4.0 score 5.9).
Published Sep 10, 2026 · Analysis Oct 30, 2026
What an attacker can do
n8n can protect MCP Trigger, form and webhook workflows with its own OAuth server. At the token endpoint, the authorization code exchange tied the access token to the resource the user approved. The refresh grant did not. It only checked that the requested resource was registered, not that it matched the original grant. A client that was approved for one workflow could therefore present its refresh token with a different workflow's URL and receive a working token for it, with no consent for that second workflow.
The attacker needs three things: a registered OAuth client, an authenticated n8n user who approves that client for one known protected resource, and the URL of a second protected resource that this user is allowed to execute. The result is that the attacker runs the second workflow with the user's authority. For MCP Trigger workflows, that means tools the user never approved for that client. The CVSS 4.0 vector shows user interaction is active (UI:A) and high confidentiality impact.
Refresh tokens issued before the fix did not store the original resource binding, so they cannot be checked retroactively.
Who is affected
n8n before 2.37.7, and the 2.38.x line before 2.38.1 (the advisory's range for that line is 2.38.0 only). Instances are exposed if they use MCP Trigger, form or webhook workflows protected by the n8n OAuth server.
npm ls n8nFor Docker or cloud installs, the version shows in the n8n UI under help, about.
n8n
- Ecosystem
- npm
- Affected
- >= 2.38.0, < 2.38.1
- Fixed in
- 2.38.1
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- < 2.37.7
- Fixed in
- 2.37.7
- Check
npm ls n8n
How to fix it
Upgrade to 2.38.1 or 2.37.7, whichever matches your release line:
npm install [email protected]The patch binds each refresh token to the granted resource and rejects a mismatch. After upgrading, require re-authorization for all existing OAuth clients, because earlier refresh tokens did not store the resource binding.
If you cannot upgrade yet, the advisory suggests:
- Restrict instance access to trusted users.
- Deactivate MCP Trigger, form and webhook workflows protected by the n8n OAuth server if not needed.
- Audit connected OAuth clients and revoke any you do not recognize.
The advisory says these do not fully remove the risk.
How to tell if you were hit
Review the list of connected OAuth clients in n8n and look for ones nobody on your team set up. Check execution history for MCP Trigger, form or webhook workflows called by an OAuth client that was only approved for a different workflow. Compare token endpoint refresh requests, if you log them, where the resource differs from the original consent. The advisory gives no log signature, so the most reliable response is to revoke unknown clients and force re-consent.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
The OAuth token endpoint bound an authorization code's first access token to the consented resource, but not its refresh token. Refreshing only checked that the requested resource was registered, not that it matched the original grant. An OAuth client approved for one workflow could refresh with a different workflow's URL and get a valid, unapproved token for it. The patch binds refresh tokens to the granted resource and rejects mismatches.
Exploitation requires the attacker to register an OAuth client, convince an authenticated user to approve that client for one known protected resource, and know the URL of a second protected resource that the consenting user is permitted to execute.
Patches
The issue has been fixed in n8n versions 2.38.1 and 2.37.7. 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:
- Restrict n8n instance access to fully trusted users only.
- Deactivate MCP Trigger, form, and webhook workflows that are protected by the n8n OAuth server if they are not required.
- Audit connected OAuth clients and revoke any that are not recognized or no longer needed.
- Require re-authorization for all existing OAuth clients after upgrading, as previously issued refresh tokens did not store the original resource binding.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Credited to bariskececi.
Questions
- Does the attacker need an n8n account?
They need a registered OAuth client and must convince an authenticated n8n user to approve it for one resource. They also need the URL of a second resource the user can execute.
- Do I have to re-authorize clients after upgrading?
Yes, the advisory advises it. Refresh tokens issued before the fix did not store the original resource binding.
- Which n8n versions are fixed?
2.38.1 for the 2.38 line and 2.37.7 for 2.37 and earlier lines.
References
Read for this analysis:
- https://github.com/n8n-io/n8n/security/advisories/GHSA-cw9w-vv67-hf73
- https://nvd.nist.gov/vuln/detail/CVE-2026-86073
- https://github.com/n8n-io/n8n/pull/37122
- https://github.com/n8n-io/n8n/pull/37588
- https://github.com/n8n-io/n8n/commit/18458482861097a26f874f30ad7e8136e268475c
- https://github.com/n8n-io/n8n/commit/380788fd9a3264c83161e868026a98731d274d88
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
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-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, 2026CVE-2026-86079
n8n: Path Injection in Elasticsearch and ElasticSecurity Nodes via Unencoded Identifiers
medium6.3Sep 10, 2026
