/

CVE-2026-65015

Severity:

HIGH RISK

(8.8)

Missing Authorization Checks (CWE-863) in n8n AI Agents

CVE-2026-65015

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Privilege Escalation and Unauthorized Access

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

n8n's AI Agents feature includes a node-execution tool that does not enforce proper authorization checks, allowing lower-privileged users to perform actions outside their intended role.

Under certain project configurations, a Project Viewer can escalate privileges by interacting with an agent that has node tools enabled, leading to unauthorized node execution and access to credential secrets.

n8n's AI Agents feature includes a node-execution tool that does not enforce proper authorization checks, allowing lower-privileged users to perform actions outside their intended role.

Under certain project configurations, a Project Viewer can escalate privileges by interacting with an agent that has node tools enabled, leading to unauthorized node execution and access to credential secrets.

Affected context

This vulnerability arises in n8n instances where the AI Agents feature is enabled and agents are configured with node-execution tools.

It is relevant in multi-user projects that differentiate between higher-privileged roles (such as editors or administrators) and lower-privileged roles (such as Project Viewers).

The issue manifests when the node-execution mechanism invoked by AI Agents does not re-check the effective permissions of the requesting user at execution time, allowing a viewer-level user to indirectly trigger operations reserved for more privileged roles, including access to credential-backed nodes.

This vulnerability arises in n8n instances where the AI Agents feature is enabled and agents are configured with node-execution tools.

It is relevant in multi-user projects that differentiate between higher-privileged roles (such as editors or administrators) and lower-privileged roles (such as Project Viewers).

The issue manifests when the node-execution mechanism invoked by AI Agents does not re-check the effective permissions of the requesting user at execution time, allowing a viewer-level user to indirectly trigger operations reserved for more privileged roles, including access to credential-backed nodes.

Exploit preconditions

  • Attack surface: Web interface or integrated chat interface for n8n AI Agents.
  • Required access: Valid Project Viewer role (or similar low-privilege account) in an affected n8n project.
  • Trigger point: Chatting with an AI Agent that has node-execution tools enabled and instructing it to run workflows or nodes that rely on stored credentials or privileged operations.
  • Why exploitation is possible: The node tool trusts the agent's configuration and the project context, but does not independently verify that the current user is authorized for the requested node actions or credential access, effectively bypassing role-based access control.
  • Attack surface: Web interface or integrated chat interface for n8n AI Agents.
  • Required access: Valid Project Viewer role (or similar low-privilege account) in an affected n8n project.
  • Trigger point: Chatting with an AI Agent that has node-execution tools enabled and instructing it to run workflows or nodes that rely on stored credentials or privileged operations.
  • Why exploitation is possible: The node tool trusts the agent's configuration and the project context, but does not independently verify that the current user is authorized for the requested node actions or credential access, effectively bypassing role-based access control.

Why this happens

The underlying bug is a missing or incomplete authorization check in the AI Agents node-execution path.

Instead of enforcing role-based access control at the moment a node is executed, the implementation allows the agent's tooling to act with project-level privileges without validating the requesting user's permissions.

This maps to CWE-863: Incorrect Authorization, where access is controlled by context or configuration rather than by consistent, user-specific permission checks.

At a pattern level, the system treats the AI Agent as a trusted orchestration layer and fails to propagate user identity and role constraints down to the node-execution subsystem, resulting in privilege escalation.

The underlying bug is a missing or incomplete authorization check in the AI Agents node-execution path.

Instead of enforcing role-based access control at the moment a node is executed, the implementation allows the agent's tooling to act with project-level privileges without validating the requesting user's permissions.

This maps to CWE-863: Incorrect Authorization, where access is controlled by context or configuration rather than by consistent, user-specific permission checks.

At a pattern level, the system treats the AI Agent as a trusted orchestration layer and fails to propagate user identity and role constraints down to the node-execution subsystem, resulting in privilege escalation.

Potential impact

  • A Project Viewer may execute nodes that they should not be able to run.
  • An attacker with viewer access could retrieve or misuse credential secrets associated with workflows.
  • Privileged operations, such as integrations with external services or data exfiltration, can be triggered by an unauthorized user.
  • Workflow integrity may be compromised through unauthorized modifications or triggering of sensitive automation.
  • A Project Viewer may execute nodes that they should not be able to run.
  • An attacker with viewer access could retrieve or misuse credential secrets associated with workflows.
  • Privileged operations, such as integrations with external services or data exfiltration, can be triggered by an unauthorized user.
  • Workflow integrity may be compromised through unauthorized modifications or triggering of sensitive automation.

General mitigation guidance

Effective mitigation focuses on enforcing strict authorization at every execution boundary and minimizing implicit trust in orchestration features like AI Agents.

Common defensive patterns include:

  • Ensuring node execution and credential access always perform explicit permission checks tied to the requesting user's identity and role.
  • Treating agent tools as untrusted mediators that must propagate and respect user-level authorization rather than project-level capability.
  • Applying least-privilege principles to workflow tools, limiting which nodes and credentials are exposable via AI Agents.
  • Segregating sensitive credentials and workflows into contexts that cannot be indirectly accessed through conversational or automated interfaces.
  • Designing defaults such that newly created agents and tools have constrained access and must be explicitly granted broader privileges.

Effective mitigation focuses on enforcing strict authorization at every execution boundary and minimizing implicit trust in orchestration features like AI Agents.

Common defensive patterns include:

  • Ensuring node execution and credential access always perform explicit permission checks tied to the requesting user's identity and role.
  • Treating agent tools as untrusted mediators that must propagate and respect user-level authorization rather than project-level capability.
  • Applying least-privilege principles to workflow tools, limiting which nodes and credentials are exposable via AI Agents.
  • Segregating sensitive credentials and workflows into contexts that cannot be indirectly accessed through conversational or automated interfaces.
  • Designing defaults such that newly created agents and tools have constrained access and must be explicitly granted broader privileges.

How teams detect issues like this

Organizations can detect similar authorization issues by:

  • Reviewing AI Agent and node-execution pathways to confirm that user identity and role information are consistently enforced at runtime.
  • Using static analysis or manual code review to identify functions that perform sensitive operations (credential access, node execution) without explicit permission checks.
  • Implementing security tests that simulate low-privilege accounts interacting with agents and attempting to trigger privileged nodes or read secrets.
  • Enforcing architectural policies that require centralized authorization services and prohibit bypassing them via new features or integration layers.
  • Leveraging automated security review tools to flag endpoints or features that expose orchestration capabilities without clear RBAC enforcement.

Organizations can detect similar authorization issues by:

  • Reviewing AI Agent and node-execution pathways to confirm that user identity and role information are consistently enforced at runtime.
  • Using static analysis or manual code review to identify functions that perform sensitive operations (credential access, node execution) without explicit permission checks.
  • Implementing security tests that simulate low-privilege accounts interacting with agents and attempting to trigger privileged nodes or read secrets.
  • Enforcing architectural policies that require centralized authorization services and prohibit bypassing them via new features or integration layers.
  • Leveraging automated security review tools to flag endpoints or features that expose orchestration capabilities without clear RBAC enforcement.

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-x5vx-c2c8-m3w9
vulncheck.comvulncheck.com/advisories/n8n-before-privilege-escalation-via-run-node-tool

Frequently asked

questions

Yes. If the n8n instance is accessible over the network, a remote attacker with a valid Project Viewer account can interact with AI Agents and attempt to trigger unauthorized node execution, subject to project configuration and exposure.

The attacker needs at least a low-privilege account, such as a Project Viewer, in a project where an AI Agent is configured with node-execution tools. They do not need direct administrative privileges to exploit the issue.

The safest approach is to ensure that every path that executes nodes or accesses credentials performs explicit authorization checks based on the requesting user's role, and to restrict AI Agents so they cannot act with broader privileges than the current user. Centralizing and reusing authorization logic across all execution mechanisms reduces the risk of inconsistent checks.

Preventing similar vulnerabilities requires designing features so that they propagate user identity and respect RBAC consistently, conducting security-focused code reviews for new orchestration or automation capabilities, and adding tests that verify low-privilege accounts cannot indirectly perform privileged operations through agents, APIs, or integrations.

Yes. If the n8n instance is accessible over the network, a remote attacker with a valid Project Viewer account can interact with AI Agents and attempt to trigger unauthorized node execution, subject to project configuration and exposure.

The attacker needs at least a low-privilege account, such as a Project Viewer, in a project where an AI Agent is configured with node-execution tools. They do not need direct administrative privileges to exploit the issue.

The safest approach is to ensure that every path that executes nodes or accesses credentials performs explicit authorization checks based on the requesting user's role, and to restrict AI Agents so they cannot act with broader privileges than the current user. Centralizing and reusing authorization logic across all execution mechanisms reduces the risk of inconsistent checks.

Preventing similar vulnerabilities requires designing features so that they propagate user identity and respect RBAC consistently, conducting security-focused code reviews for new orchestration or automation capabilities, and adding tests that verify low-privilege accounts cannot indirectly perform privileged operations through agents, APIs, or integrations.

Find out what's already
exploitable in your codebase.