n8n SSO instance-role provisioning allows privilege escalation to owner

HighSE Fix-First Score 43/100CVE-2026-65016SE-AIV-01708Missing or broken access controlAI softwareMade public 23 Jul 2026

Download as PDF

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 Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform or infrastructure team responsible for n8n deployments.
Likely effortAbout 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-01708

What 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.

Map where your company uses AI

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

SoftwareAffected versionsMove 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.82.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 attackedNo known attacks and no public attack code when CISA last reviewed it
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededAn ordinary user account
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal 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_ip

Find 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.action

Written 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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 n8n

Check if instance-role provisioning is enabled in n8n (Linux/macOS)for this issue

echo $N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE

Check if instance-role provisioning is enabled in n8n (Docker)for this issue

docker inspect <container_id> | grep N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE

Temporarily disable instance-role provisioning (add to .env or environment)for this issue

N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE=false

Require 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.

What is the difference between this vulnerability and a normal admin account?A good answer: This vulnerability requires an attacker to control the role claim from your identity provider, whereas a normal admin account is created by an n8n owner through the user interface.
If instance-role provisioning is disabled, is n8n safe from this issue?A good answer: Yes, if N8N_SSO_SCOPES_PROVISION_INSTANCE_ROLE is set to false or not present, the vulnerable code path is not used and this specific issue does not apply, though you should still upgrade for other security fixes.
What should we do if we find an unauthorized owner account in our n8n logs?A good answer: Remove the unauthorized account immediately, review all workflows and credentials for signs of tampering or theft, check IdP logs to see when and how the malicious role claim was issued, and report the incident to your security team.
Why is this called a privilege escalation?A good answer: Because an attacker starts with SSO user permissions and tricks n8n into promoting them to owner, which gives full control of the instance instead of limited user access.

Run a full timed drill with your team

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.

Sign in to track this fix

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-65016

For 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.