NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-86073: n8n: Per-Resource OAuth Consent Bypass via Unbound Refresh Token Resource Substitution

mediumCVSS 4.0 5.9GHSA-cw9w-vv67-hf73

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 n8n

For 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

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 entries