logo

Database

N8n Chat Trigger Without Authentication

Description

Detects when a Chat Trigger node in the published version of an n8n workflow makes its chat public without authenticating who writes to it, because its Authentication option is set to neither Basic Auth nor n8n User Auth, or to an expression n8n resolves only when the workflow runs, so the node starts the workflow for each message it accepts. Anyone who learns or guesses the chat URL can then talk to the workflow with messages of their choosing, and make it act with the credentials and the access to other systems its nodes hold.

Weakness:

006 - Authentication mechanism absence or evasion

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 only the version of each one that is published, skipping disabled nodes

    • Keeps the Chat Trigger nodes whose Make Chat Publicly Available option is set to true, since n8n answers 404 to the chat of a node that is not public, or to an expression in double braces, whose value is only known when n8n evaluates it and which the evidence names without its text; an instance setting that turns off every public chat is not visible to an API key, so a node on such an instance is still reported

    • Reads the Authentication option of each kept node, an option left unset counting as None, the n8n default, and counts an option that is an expression in double braces as unchecked, since its value is only known when n8n evaluates it; the evidence then says the option is set by an expression, without its text

    • Reports a vulnerability when the option is None or any value other than basicAuth or n8nUserAuth; a workflow whose listing omits the published version field, or whose published version has no node list, is recorded as unreadable rather than reported as clean