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/newexposed 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).

