CVE-2026-65016: n8n: SSO Instance-Role Provisioning Allows Privilege Escalation to Instance Owner
n8n's Enterprise SSO instance-role provisioning does not block the `global:owner` role. An SSO user whose instance-role claim resolves to `global:owner` becomes instance owner. It needs the non-default `N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE` flag and control over the claim at the IdP. Fixed in n8n 1.123.64, 2.29.8 and 2.30.1.
Published Jul 22, 2026 · Analysis Oct 25, 2026
What an attacker can do
With instance-role provisioning on, n8n reads a role claim from the Identity Provider and sets the user's global role during login. The token-exchange identity path explicitly rejects global:owner. The SSO provisioning path did not, so a claim value of global:owner created an instance owner.
An owner has full administrative control: every workflow, every stored credential, all users and the instance configuration. Credentials are the prize, since workflows hold API keys and tokens for connected services.
The condition is narrow. The flag is off by default, and the attacker must control the claim value the IdP issues. That claim is usually an admin-managed attribute, so exploitation generally means control of the IdP or its claim-to-role mapping, or a permissive IdP setup in which a lower-privileged user can influence the claim. A malicious or compromised IdP administrator, or a self-editable profile attribute mapped to the role claim, are the realistic cases.
Deployments without Enterprise SSO, or with provisioning disabled, are not affected. The vector rates all three impact areas high with a prerequisite on the attacker's side.
Who is affected
The n8n npm package before 1.123.64, from 2.0.0-rc.0 before 2.29.8, and 2.30.0 before 2.30.1. It matters only with Enterprise SSO configured and N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE enabled.
npm ls n8nFor Docker, check the image tag, then check the environment for the provisioning flag.
n8n
- Ecosystem
- npm
- Affected
- < 1.123.64
- Fixed in
- 1.123.64
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.30.0, < 2.30.1
- Fixed in
- 2.30.1
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.0.0-rc.0, < 2.29.8
- Fixed in
- 2.29.8
- Check
npm ls n8n
How to fix it
Upgrade to n8n 1.123.64, 2.29.8 or 2.30.1, or later on your release line.
npm install [email protected]Temporary mitigations from the advisory, which do not fully fix the risk:
- Unset
N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLEor set it tofalse. - Audit IdP claim mappings so no user-controllable attribute can supply the instance-role value.
- Limit SSO access to fully trusted users.
How to tell if you were hit
List the users with the global:owner role and confirm each one is expected. Look for owner accounts that appeared through SSO logins, and check the IdP's logs for claim values or mapping changes that gave a user the owner role. Review recent changes to credentials, users and instance settings made by any new owner.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
n8n's Enterprise SSO instance-role provisioning maps a role claim asserted by the configured Identity Provider (IdP) to an n8n global role and applies it during authentication. The provisioning path did not prevent assignment of the global:owner role, unlike the token-exchange identity path, which explicitly rejects it. As a result, an SSO-authenticated user whose instance-role claim resolves to global:owner is provisioned as an instance owner, obtaining full administrative control over all workflows, credentials, users, and instance configuration.
This is a privilege-escalation issue that is exploitable only under specific conditions. It affects instances where Enterprise SSO is configured and instance-role provisioning is enabled via the N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE flag, which is disabled by default. Exploitation additionally requires the attacker to control the value of the instance-role claim issued by the IdP. As this claim is typically an administrator-managed attribute, exploitation generally requires control over the IdP or its claim-to-role mapping, or a permissive IdP configuration in which a lower-privileged user can influence the claim value. Deployments that do not use Enterprise SSO, or that have instance-role provisioning disabled, are not affected.
Patches
The issue has been fixed in n8n versions 1.123.64, 2.29.8, and 2.30.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:
- Disable instance-role provisioning by unsetting or setting
N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=false. - Audit IdP claim mappings to ensure no user-controllable attribute can supply the instance-role claim value.
- Restrict SSO access to fully trusted users only.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Credited to ttzero25.
Questions
- Is every SSO deployment of n8n affected by CVE-2026-65016?
No. Only instances with Enterprise SSO and
N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLEenabled. The flag is off by default.- Can any user make themselves owner?
Only if they control the instance-role claim the IdP sends. That usually means IdP admin access or a permissive claim mapping where a lower-privileged user can set the value.
- Which versions fix it?
n8n 1.123.64, 2.29.8 and 2.30.1, matched to your release line.
- How is token exchange different?
The advisory says the token-exchange identity path already rejects
global:owner, while the SSO provisioning path did not.
References
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2026-65016
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://www.vulncheck.com/advisories/n8n-before-privilege-escalation-via-sso-instance-role
- https://github.com/advisories/GHSA-35q8-9mj6-wjmf
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-86073
n8n: Per-Resource OAuth Consent Bypass via Unbound Refresh Token Resource Substitution
medium5.9Sep 10, 2026CVE-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, 2026
