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, 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 rather than to an expression, since n8n answers 404 to the chat of a node that is not public; 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 leaves a node unreported when that option is an expression in double braces, since its value is only known when n8n evaluates it

    • 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