{"id":"GHSA-35q8-9mj6-wjmf","revision":"4f7c28df66e6440ca0dedb17cb201866","records":[{"revision":"4f7c28df66e6440ca0dedb17cb201866","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-35q8-9mj6-wjmf","aliases":["CVE-2026-65016"],"title":"n8n: SSO Instance-Role Provisioning Allows Privilege Escalation to Instance Owner","description":"## Impact\nn8n'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.\n\nThis 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.\n\n## Patches\nThe 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.\n\n## Workarounds\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Disable instance-role provisioning by unsetting or setting `N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=false`.\n- Audit IdP claim mappings to ensure no user-controllable attribute can supply the instance-role claim value.\n- Restrict SSO access to fully trusted users only.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","state":0,"publishedAt":"2026-07-22T22:04:04+00:00","modifiedAt":"2026-07-22T22:26:48.326763+00:00","affected":[{"ecosystem":"npm","name":"n8n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.123.64"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"n8n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.30.0"},{"kind":"fixed","version":"2.30.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"n8n","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0-rc.0"},{"kind":"fixed","version":"2.29.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/n8n-io/n8n/security/advisories/GHSA-35q8-9mj6-wjmf","https://nvd.nist.gov/vuln/detail/CVE-2026-65016","https://github.com/n8n-io/n8n","https://github.com/n8n-io/n8n/releases/tag/n8n@1.123.64","https://github.com/n8n-io/n8n/releases/tag/n8n@2.29.8","https://github.com/n8n-io/n8n/releases/tag/n8n@2.30.1","https://www.vulncheck.com/advisories/n8n-before-privilege-escalation-via-sso-instance-role"],"sourceUrl":"https://github.com/advisories/GHSA-35q8-9mj6-wjmf","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-35q8-9mj6-wjmf","identifiers":["GHSA-35q8-9mj6-wjmf","CVE-2026-65016"]},"retained":false,"historicalAffected":[]}],"coverage":[]}