Executive brief
n8n is a workflow automation platform used by organizations to build and execute business processes. The platform's OAuth security mechanism failed to properly restrict refresh tokens to their originally-approved workflow resources. An attacker could trick a user into approving an OAuth app for one workflow, then reuse that approval to gain unauthorized access to other workflows the user can execute, effectively bypassing access controls and gaining unauthorized automation capabilities.
Technical details
The vulnerability is a CWE-863 (Incorrect Authorization) flaw in n8n's OAuth token endpoint. While the initial access token was correctly bound to the consented resource, refresh tokens were not. When a client refreshed a token, the endpoint only verified that the requested resource was registered in the system, not that it matched the resource for which the original grant was issued. An attacker must register an OAuth client, socially engineer an authenticated n8n user to approve it for one known protected resource (MCP Trigger, form, or webhook workflow), and know the URL of a second protected resource the victim can access. The refresh token can then be used with the second resource URL to obtain a valid access token for an unapproved workflow. Patches bind refresh tokens to the granted resource and reject mismatches. Fixed in n8n 2.38.1 and 2.37.7.
Affected products
- n8n n8n >=2.38.0,<2.38.1 and <2.37.7
Timeline
- 2026-09-10: disclosed
- 2026-09-03: patched: Patches released in n8n 2.38.1 and 2.37.7