logo

Database

N8n Callable By Any Workflow

Description

Detects when an n8n workflow lets any other workflow on the instance call it, because its callerPolicy setting is any. Any user who can build a workflow on the instance can then run it through an Execute Workflow node, together with the credentials and the access to other systems it holds, whatever project or owner the calling workflow belongs to.

Weakness:

159 - Excessive privileges

Category: Access Subversion

Detection Strategy

    • Lists every workflow the API key's user can see through the n8n public API, all of them for an owner or admin key, and reads the callerPolicy setting of each one from the workflow itself, whether it is published, unpublished or archived

    • Leaves a workflow with no callerPolicy of its own unreported, since it then follows the instance default, which an API key cannot read

    • Looks for the node n8n starts a call from, an Execute Workflow Trigger or else a Manual Trigger or a Manual Chat Trigger, enabled or not, in the workflow's draft, which a call from a manual or chat execution runs, and in its published version, which every other call runs

    • Reports a vulnerability when callerPolicy is any and the draft or the published version has such a node, and shows in the evidence whether the workflow is published, whether it is archived and the node each version starts from

    • Records the workflow as unreadable for this rule, neither reported nor closed, when callerPolicy is any, no version it could read has such a node and the listing did not return the nodes of the draft or of the published version, each with its type

    • Records it as unreadable as well when a version starts only from the legacy Start node, which n8n accepted as a start node before version 2.2