n8n SSO instance-role provisioning allows privilege escalation to owner
What this means
An attacker who can control the role claim from your identity provider (IdP) can gain full administrator access to n8n, including all workflows, stored credentials, user accounts, and instance settings. This requires the attacker to have compromised or influenced your IdP configuration, or to work for an organization with a permissive IdP setup. Once an attacker has owner access, they can steal credentials, modify workflows, add new admin accounts, or shut down the service.
SecurityElites Manager Brief: the decision in one minute
n8n's SSO feature can be tricked into making an attacker an owner if instance-role provisioning is enabled and the attacker can control the role claim from your identity provider. Only companies using Enterprise SSO with this feature turned on are at risk. You need to upgrade immediately or disable this feature.
| SecurityElites Fix-First Score | 43 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 30 days High severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform or infrastructure team responsible for n8n deployments. |
| Likely effort | About 15 minutes per n8n instance: check the configuration flag, upgrade to the fixed version, and restart. It could take longer if you have many instances or if your deployment process is complex. |
Questions to ask your team or supplier
- Do we have Enterprise SSO configured and is N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE enabled in any of our n8n instances?
- Who in our organization can modify or influence the instance-role claim value in our identity provider, and have we reviewed their access recently?
- Have we reviewed the user accounts and roles in our n8n instances to check for any unauthorized owners or admins that may have been created before we knew about this issue?
Message you can forward to the owning team
Security notice: n8n SSO instance-role provisioning allows privilege escalation to owner (CVE-2026-65016)
Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.30.1 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-65016-n8n-sso-instance-role-provisioning-allows-privilege-escalation-to-owner/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01708What is at stake in your AI setup
- Keys for external AI providers: an attacker with owner access can view, copy, or delete stored API keys and credentials used for AI integrations.
- Workflows and prompts: an attacker can modify, export, or delete workflows that contain AI prompts, system instructions, or integrations with language models.
- Tools and systems an agent is connected to: an attacker can use owner access to redirect AI agents to malicious systems, change their permissions, or use them to attack other services.
- Training and retrieval data: if n8n is used to manage fine-tuning data or retrieve-augmented-generation sources, an attacker can access, modify, or exfiltrate this data.
Who is exposed
- n8n instances with Enterprise SSO enabled and N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE set to true (or enabled by default in future versions).
- Teams where the identity provider is managed by or accessible to an attacker, or where low-privilege users can change role claims.
- Organizations that have not recently audited their IdP configuration for claim-to-role mappings.
- Any n8n version before 1.123.64, all versions from 2.0.0-rc.0 up to 2.29.7, and version 2.30.0.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| n8n npm | Every version before 1.123.64; 2.30.0 up to, but not including, 2.30.1; 2.0.0-rc.0 up to, but not including, 2.29.8 | 2.30.1 or later |
Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: n8n 1.123.64, 2.29.8, 2.30.1.
Am I affected?
Enter the version you run. Nothing you type is stored.
SecurityElites Developer Brief: the technical picture
| Is it being attacked | No known attacks and no public attack code when CISA last reviewed it |
|---|---|
| Where the attacker must be | Anywhere that can reach it over a network, including the internet if it is exposed |
| Account needed | An ordinary user account |
| Does a person have to do something | No. It works without anyone clicking or opening anything |
| How hard it is to do | Easy. It works reliably once the attacker can reach it |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | High |
| Can attackers automate it at scale | No, according to CISA. Each target needs manual work |
| How much control an attacker gains | Total control of the affected software, according to CISA |
Read from the official severity rating: 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
Kind of coding mistake
- CWE-639: another user's data can be reached by changing an identifier
If you cannot upgrade today
- Set `N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=false` to disable the vulnerable feature. Users will not be automatically provisioned with roles, but existing roles remain in place.
- Restrict SSO access in your identity provider to fully trusted users only, and audit the IdP configuration to confirm that no user-controllable attribute can supply the instance-role claim.
- These workarounds reduce but do not eliminate the risk. Upgrade as soon as possible.
Signs it may already have been used against you
- Check n8n's audit log or user activity history for new owner or admin accounts created before the upgrade date.
- Look for SSO login events in your IdP logs that assigned the instance-role claim value of 'global:owner' or similar to users who should not have that role.
- Review n8n administration → users to find any unexpected owner accounts, especially those that have no password or were created outside your normal user provisioning process.
- Check workflow execution logs for suspicious activity such as exports of credentials, modifications to system workflows, or access to sensitive data shortly after SSO logins from unfamiliar locations.
Log searches to start from
Find SSO logins that resulted in owner role assignment (adapt field names to your log format)Splunk
sourcetype=n8n OR source=n8n (login OR auth) sso (owner OR admin OR role=owner) | table timestamp, user, role, source_ipFind unexpected owner account creation events (adapt field names to your logs)Elastic
source:n8n AND (event.action:user.created OR event.action:role.assigned) AND roles:owner | fields @timestamp, user, roles, event.actionWritten with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.
SecurityElites Fix Guide: step by step
- Check if Enterprise SSO instance-role provisioning is enabledLog in to the n8n server and check the environment variables. Look for `N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE`. If this variable is set to `true` or is present, the feature is enabled and you are at risk. If the variable is not set or is set to `false`, this vulnerability does not affect you, but you should still upgrade for other security updates.
- Identify which version of n8n is runningCheck your n8n instance version in the user interface (usually in settings or the bottom-left corner) or by running the version check command for your deployment method. Write down the exact version number.
- Review your IdP configuration for the instance-role claimContact your identity provider administrator or check the IdP settings to see who can modify the instance-role claim value and whether any lower-privileged users can influence it. Document any users or groups that have access to change this claim.
- Check n8n user and owner accounts for unauthorized activityLog in as an owner and review the users list in n8n administration. Look for any unexpected owner or admin accounts created before you started fixing this issue. Check the audit log or activity history if available to see when these accounts were created and what they did.
- Disable instance-role provisioning immediately as a temporary stepSet the environment variable `N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=false` and restart n8n. This turns off the vulnerable feature while you prepare to upgrade. Users with existing roles will keep them, but new SSO logins will not automatically get roles until you re-enable the feature after patching.
- Upgrade n8n to the fixed versionUsing your deployment method (npm, Docker, or other), upgrade to version 1.123.64, 2.29.8, 2.30.1, or any later version. Follow the upgrade process for your environment and ensure you have a backup before starting.
- Restart n8n and verify the fixAfter upgrading, restart the n8n service. Check the version in the user interface or logs to confirm the new version is running. If you disabled instance-role provisioning in step 5, re-enable it now by setting `N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=true` and restart again.
- Review and strengthen IdP claim controlsWork with your identity provider administrator to restrict who can modify the instance-role claim value. Ensure that only trusted administrators can set this claim and that lower-privileged users cannot influence it. Document these controls for future audits.
How to confirm it is fixed: Log in to n8n and confirm the version number in settings is 1.123.64 or higher, 2.29.8 or higher, or 2.30.1 or higher, depending on your release series.
SecurityElites Quick Fixes: copy and paste
Upgrade n8n with npmupgrade
npm install n8n@2.30.1
npm ls n8nCheck if instance-role provisioning is enabled in n8n (Linux/macOS)for this issue
echo $N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLECheck if instance-role provisioning is enabled in n8n (Docker)for this issue
docker inspect <container_id> | grep N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLETemporarily disable instance-role provisioning (add to .env or environment)for this issue
N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=falseRequire sign-in with nginx in front of the servicegeneral hardening
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://127.0.0.1:8080;
}Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.
Let your AI coding assistant do the upgrade
Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.
Instruction for your coding assistant
You are helping me fix a security vulnerability (CVE-2026-65016) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n - n8n (npm): must be 2.30.1 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.SecurityElites Incident Drill: could your team handle this?
Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## n8n SSO instance-role provisioning allows privilege escalation to owner (CVE-2026-65016)
**Severity:** High | **SE Fix-First Score:** 43/100 | **Fix window:** Within 30 days
**Record:** SE-AIV-01708 https://securityelites.com/ai-vulnerabilities/cve-2026-65016-n8n-sso-instance-role-provisioning-allows-privilege-escalation-to-owner/
### Why this matters
An attacker who can control the role claim from your identity provider (IdP) can gain full administrator access to n8n, including all workflows, stored credentials, user accounts, and instance settings. This requires the attacker to have compromised or influenced your IdP configuration, or to work for an organization with a permissive IdP setup. Once an attacker has owner access, they can steal credentials, modify workflows, add new admin accounts, or shut down the service.
### What to do
1. Check if Enterprise SSO instance-role provisioning is enabled
2. Identify which version of n8n is running
3. Review your IdP configuration for the instance-role claim
4. Check n8n user and owner accounts for unauthorized activity
5. Disable instance-role provisioning immediately as a temporary step
6. Upgrade n8n to the fixed version
7. Restart n8n and verify the fix
8. Review and strengthen IdP claim controls
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-65016-n8n-sso-instance-role-provisioning-allows-privilege-escalation-to-owner/
### Done when
- [ ] n8n is at 2.30.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to n8n and confirm the version number in settings is 1.123.64 or higher, 2.29.8 or higher, or 2.30.1 or higher, depending on your release series.
- [ ] Logs were checked for signs of earlier use
SecurityElites Fix Tracker
Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.
Related vulnerabilities
In the same software
- n8n legacy expression engine allows code execution via JSON.stringify override High · CVE-2026-86083
- n8n OpenAI node bypasses domain restrictions on model search High · CVE-2026-86082
- n8n Git node can freeze the instance with a crafted path High · CVE-2026-86081
- n8n OAuth registration accepts unlimited field sizes, filling the database High · CVE-2026-86075
- n8n expression compiler can run arbitrary code through class field names High · CVE-2026-86076
- n8n Edit Fields node can crash the whole instance with a bad field name High · CVE-2026-72749
The same kind of mistake in other AI tools
- Langflow OSS allows authenticated users to access or change other users' flows High · CVE-2026-127067
- BaaRai ARTEX admin account can be claimed without authentication on first setup Critical · CVE-2026-140422
- BaaRai ARTEX admin login can be guessed without limits or lockouts Critical · CVE-2026-140365
- NLTK dependency parser crashes on long sentences High · CVE-2026-129222
- NLTK regex compilation denial of service via many groups High · CVE-2026-129229
Change history
- 22 Jul 2026: Made public
- 2 Dec 2026: Published
Official record
## 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.
Weakness type: CWE-639
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-65016For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker
The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.