/

CVE-2026-86073

Severity:

HIGH RISK

(7.6)

OAuth Authorization Bypass (CWE-863) in n8n Token Endpoint

CVE-2026-86073

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Unauthorized access to protected workflows

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

An authorization bypass in n8n's OAuth token endpoint can allow a client approved for one workflow to obtain a valid access token for a different workflow. The issue becomes risky when the client can influence the resource parameter and the consenting user can access the substituted workflow.

Affected context

The vulnerability occurs in n8n deployments using the affected OAuth token flow. The initial access token is bound to the consented resource, but the associated refresh token is not. During refresh, the requested resource is checked only against registered resources rather than against the resource authorized in the original grant.

Exploit preconditions

  • Attack surface: OAuth token and refresh-token endpoints
  • Required access: A client capable of participating in the OAuth flow and a consenting user with access to multiple workflows
  • Trigger point: Refreshing a token while supplying a different registered workflow resource
  • Why exploitation is possible: Refresh validation does not verify that the requested resource matches the resource approved in the original authorization grant

Why this happens

The underlying bug is an incomplete authorization relationship between an OAuth refresh token and its originally consented resource. The token endpoint validated that a substituted resource was registered, but did not preserve and enforce the resource binding established during consent. This behavior maps to CWE-863, Missing Authorization, because possession of a valid grant could be used to obtain access beyond the permissions actually approved.

Potential impact

  • An attacker could obtain a token for an unapproved workflow
  • Unauthorized workflow data access could occur under the consenting user's privileges
  • Workflow operations or connected resources may be exposed, depending on granted permissions
  • Audit records could incorrectly associate unauthorized access with a legitimate OAuth client

General mitigation guidance

Mitigation generally focuses on preserving authorization context throughout the

complete OAuth token lifecycle.

Common defensive patterns include:

  • Binding access and refresh tokens cryptographically or transactionally to the exact consented resource
  • Requiring refresh requests to match the resource recorded in the original grant
  • Rejecting resource substitutions instead of merely checking resource registration
  • Applying least privilege to OAuth clients and workflow permissions
  • Minimizing the number of workflows and resources exposed to each client
  • Requiring explicit reauthorization when a client requests a different resource
  • Maintaining clear, tamper-resistant audit records for consent, refresh, and resource decisions

How teams detect issues like this

Detection can include:

  • Static analysis and code review checks for refresh-token validation that compares only resource registration
  • Tests confirming that a refresh token cannot be exchanged for a different resource
  • Monitoring for refresh requests whose resource differs from the resource recorded at consent time
  • Policy enforcement requiring immutable authorization-resource bindings
  • Alerts for OAuth clients accessing workflows outside their historical consent scope

Automated security review tools may help identify missing authorization checks, but endpoint-level authorization tests remain important.

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/commit/18458482861097a26f874f30ad7e8136e268475c
github.comgithub.com/n8n-io/n8n/commit/380788fd9a3264c83161e868026a98731d274d88
github.comgithub.com/n8n-io/n8n/pull/37122
github.comgithub.com/n8n-io/n8n/pull/37588
github.comgithub.com/n8n-io/n8n/releases/tag/n8n@2.37.7
github.comgithub.com/n8n-io/n8n/releases/tag/n8n@2.38.1
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-cw9w-vv67-hf73

Frequently asked

questions

It may be exploitable through the OAuth token endpoint over the network when the attacker can use an OAuth client flow and influence the requested resource.

The attacker generally needs a valid OAuth interaction involving a user who can access the target workflow. The exact requirements depend on client registration and deployment controls.

Bind refresh tokens to the exact resource and authorization context approved during consent, and reject any refresh request that changes that binding.

Use end-to-end authorization tests for access and refresh flows, enforce least-privilege client permissions, and monitor for resource changes across the token lifecycle.

Find out what's already
exploitable in your codebase.