{"id":"CVE-2026-65016","aliases":["CVE-2026-65016","GHSA-35q8-9mj6-wjmf"],"related":[],"kind":"vulnerability","state":"published","title":"n8n before 1.123.64, 2.29.8, and 2.30.1 Privilege Escalation via SSO Instance-Role","summary":"n8n versions before 1.123.64, 2.29.8, and 2.30.1 contain a privilege escalation vulnerability in Enterprise SSO instance-role provisioning. The provisioning path maps an IdP-asserted role claim to an n8n global role but does not prevent assignment of the global:owner role (unlike the token-exchange identity path, which rejects it). An SSO-authenticated user whose instance-role claim resolves to global:owner is provisioned as instance owner, gaining full administrative control over workflows, credentials, users, and instance configuration. Exploitation requires that Enterprise SSO is configured, instance-role provisioning is enabled via N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE (disabled by default), and the attacker controls the instance-role claim value issued by the IdP.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"n8n versions before 1.123.64, 2.29.8, and 2.30.1 contain a privilege escalation vulnerability in Enterprise SSO instance-role provisioning. The provisioning path maps an IdP-asserted role claim to an n8n global role but does not prevent assignment of the global:owner role (unlike the token-exchange identity path, which rejects it). An SSO-authenticated user whose instance-role claim resolves to global:owner is provisioned as instance owner, gaining full administrative control over workflows, credentials, users, and instance configuration. Exploitation requires that Enterprise SSO is configured, instance-role provisioning is enabled via N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE (disabled by default), and the attacker controls the instance-role claim value issued by the IdP.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de n8n anteriores a la 1.123.64, 2.29.8 y 2.30.1 contienen una vulnerabilidad de escalada de privilegios en el aprovisionamiento de roles de instancia de SSO Empresarial. La ruta de aprovisionamiento mapea una declaración de rol afirmada por el IdP a un rol global de n8n, pero no impide la asignación del rol global:owner (a diferencia de la ruta de identidad de intercambio de tokens, que lo rechaza). Un usuario autenticado por SSO cuya declaración de rol de instancia se resuelve como global:owner es aprovisionado como propietario de la instancia, obteniendo control administrativo total sobre flujos de trabajo, credenciales, usuarios y configuración de la instancia. La explotación requiere que el SSO Empresarial esté configurado, que el aprovisionamiento de roles de instancia esté habilitado a través de N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE (deshabilitado por defecto), y que el atacante controle el valor de la declaración de rol de instancia emitido por el IdP.","source":"nvd"}],"published":"2026-07-22T11:21:38.704Z","modified":"2026-10-29T21:16:20.600Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","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":7.7,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","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":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-639"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.123.64","status":"affected"},{"type":"semver","version":"1.123.64","status":"unaffected"}],"vendor":"n8n-io","product":"n8n","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.30.0","fixed":"2.30.1","status":"affected"},{"type":"semver","version":"2.30.1","status":"unaffected"}],"vendor":"n8n-io","product":"n8n","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0-rc.0","fixed":"2.29.8","status":"affected"},{"type":"semver","version":"2.29.8","status":"unaffected"}],"vendor":"n8n-io","product":"n8n","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.123.64"}],"ecosystem":"npm","package":"n8n","purl":"pkg:npm/n8n","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.30.0","status":"affected","fixed":"2.30.1"}],"ecosystem":"npm","package":"n8n","purl":"pkg:npm/n8n","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0-rc.0","status":"affected","fixed":"2.29.8"}],"ecosystem":"npm","package":"n8n","purl":"pkg:npm/n8n","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.123.64"},{"status":"affected","fixed":"1.123.64"},{"status":"affected","introduced":"2.0.0","fixed":"2.29.8"},{"status":"affected","introduced":"2.0.0","fixed":"2.29.8"},{"status":"affected","version":"2.30.0"},{"status":"affected","version":"2.30.0"}],"vendor":"n8n","product":"n8n","cpe":"cpe:2.3:a:n8n:n8n:*:*:*:*:community:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-35q8-9mj6-wjmf","tags":["mitigation","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/n8n-before-privilege-escalation-via-sso-instance-role","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65016","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/n8n-io/n8n","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@1.123.64","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.29.8","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.30.1","tags":["web"],"sources":["ghsa"]}],"credits":["ttzero25"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-07-23T18:16:35.338Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-65016","url":"https://www.cve.org/CVERecord?id=CVE-2026-65016","licence":"CVE Terms of Use","modified":"2026-10-29T21:16:20.600Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-35q8-9mj6-wjmf","url":"https://github.com/advisories/GHSA-35q8-9mj6-wjmf","licence":"CC-BY-4.0","modified":"2026-07-22T22:26:48.326Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-65016","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65016","licence":"Public domain","modified":"2026-10-29T19:17:25.800Z"}],"updatedAt":"2026-11-25T22:59:29.804Z","epss":{"score":0.00326,"percentile":0.2772,"date":"2026-12-01T12:00:22.000Z"}}