/

CVE-2026-56776

Severity:

HIGH RISK

(7.4)

Authorization Bypass (CWE-863) in n8n Workflow Tests

CVE-2026-56776

Analyzed

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Unauthorized Workflow Execution and Side Effects

Severity:

HIGH RISK

(7.4)

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

An authorization bypass in n8n's workflow evaluation test endpoint allows users with only workflow:read permissions to execute workflows as if they had workflow:execute.

When the Evaluations feature is enabled and RBAC grants read-only access, an authenticated user can trigger real workflow runs that interact with external systems and mutate data.

Affected context

This vulnerability arises in n8n instances that use the Evaluations feature and role-based access control (RBAC) to differentiate between read and execute permissions for workflows.

Specifically, it affects the POST /workflows/{workflowId}/test-runs/new endpoint, which incorrectly relies on the workflow:read scope to authorize evaluation runs.

In environments where project roles grant workflow:read but not workflow:execute, users who are expected to have read-only visibility can still cause workflows to run via the internal workflow runner, potentially impacting downstream APIs, databases, or third-party integrations.

Exploit preconditions

  • Attack surface: HTTP POST endpoint /workflows/{workflowId}/test-runs/new exposed by the n8n web application.
  • Required access: Valid authenticated account with workflow:read permissions on a target workflow; no workflow:execute permission required.
  • Trigger point: Issuing a POST request to the test-runs endpoint for a workflow that is wired to external services or data stores.
  • Why exploitation is possible: The authorization logic checks for workflow:read instead of workflow:execute, allowing read-only users to invoke the internal workflow runner and execute the workflow in evaluation mode with real side effects.

Why this happens

The core issue is an access control misconfiguration where the permission model is not correctly enforced for a sensitive operation.

According to CWE-863: Incorrect Authorization, the system authorizes the action based on insufficient or incorrect privileges, in this case using workflow:read to gate an operation that should require workflow:execute.

The design assumes evaluation test runs are low-risk, but the implementation reuses the same internal workflow runner that drives production executions, leading to real outbound calls and data changes without the proper permission boundary.

Potential impact

  • Read-only users may trigger workflows that perform unintended outbound API requests.
  • Workflows can cause unauthorized data mutations in databases or connected services.
  • Downstream third-party systems may receive unexpected commands or updates.
  • Audit trails and compliance assumptions about "read-only" roles can be invalidated.
  • Misuse of workflows could lead to business logic abuse or operational disruptions.

General mitigation guidance

Effective mitigation centers on enforcing correct authorization boundaries for workflow execution and test-related endpoints.

Common defensive patterns include:

  • Ensuring that any endpoint capable of running a workflow requires an execution-specific permission (e.g., workflow:execute) rather than generic read access.
  • Separating "safe" evaluation or preview mechanisms from full execution paths, using sandboxed runners or mock integrations that cannot reach real downstream systems.
  • Designing RBAC roles so that read-only profiles cannot invoke operations with potential side effects, and validating this through permission mapping reviews.
  • Applying least-privilege principles to both users and system-to-system interactions, minimizing what a mistakenly authorized workflow can reach or modify.
  • Implementing configuration options that allow administrators to disable side-effecting evaluation runs in sensitive environments or restrict them to dedicated test projects.

How teams detect issues like this

Organizations can detect and control similar authorization issues by:

  • Reviewing access control checks in code for all endpoints that trigger workflow execution, verifying that they depend on explicit execute-level permissions.
  • Using static analysis or policy-as-code tools to flag mismatches between operation sensitivity (e.g., "runs workflows", "writes data") and associated permission scopes.
  • Conducting focused code reviews on new features like "Evaluations" or "test runs" to ensure they do not bypass established RBAC controls or reuse powerful execution paths without proper checks.
  • Monitoring logs for anomalous workflow executions initiated by accounts assigned to read-only roles, and correlating them with test-run endpoints or evaluation features.
  • Enforcing security gates in CI/CD that validate RBAC policies against a catalog of protected operations (such as workflow execution or data mutation).

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-hv7x-3x78-gx53
vulncheck.comvulncheck.com/advisories/n8n-incorrect-oauth-scope-validation-in-workflow-test-run-endpoint

Frequently asked

questions

No. Exploitation requires an authenticated user account with workflow:read permissions on the target workflow. The issue is that read-only users can perform actions that should require the higher workflow:execute permission.

An attacker must have access to an n8n project or workspace where their role grants workflow:read on one or more workflows. They do not need workflow:execute rights, but they must be able to send requests to the /workflows/{workflowId}/test-runs/new endpoint.

The safest pattern is to ensure that any operation capable of causing side effects—such as running workflows, sending outbound API calls, or mutating data—requires a dedicated execute or write permission. Test and evaluation endpoints should be explicitly bound to these permissions or to a sandboxed mechanism that cannot affect production systems.

Teams can prevent similar issues by defining a clear permission model for side-effecting operations, codifying it in documentation and tests, and enforcing it consistently across APIs. This includes regular RBAC reviews, automated checks that compare endpoint behavior with required scopes, and treating new "evaluation" or "preview" features as potentially sensitive until proven otherwise.

Find out what's already
exploitable in your codebase.