N8n Plaintext Secret
Description
Detects when a node in the published version of an n8n workflow keeps a secret written as plain text: a value with the shape of a known provider token, a private key or a URL with a password, in any parameter of the node, its notes or a sticky note, or a literal in a field meant for a secret, such as an Authorization header, a password field or an API key in a query. Anyone who can open, export or copy the workflow can read the secret and use it with the permissions it grants. Removing it from the workflow does not revoke it, and earlier versions of the workflow may still hold it, so it has to be rotated and moved into an n8n credential.
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 every node of the version of each one that is published, disabled nodes included
• Looks in every parameter of each node, sticky notes included, in the JSON text of its JSON fields and in its notes for a value with the shape of a GitHub, GitLab, Slack, OpenAI, Anthropic, Google, Stripe, SendGrid or Hugging Face key or token, an AWS access key ID, a Slack webhook URL, a Telegram Bot API URL with a bot token, a private key block or a URL with a password
• Outside notes and sticky notes, also looks for a literal in a field meant for a secret: a field named Authorization, Cookie or Proxy-Authorization, a field whose name ends in the word password, passphrase, secret or apikey, or in key or token after access, API, auth, bearer, client, private, refresh, secret or session, a key or token in a URL query, and one of those names given a quoted value in code or in JSON text; an expression counts only for the text it writes literally, and in every case but a private key block, a value that looks like a placeholder or has too little variety to be a secret is skipped
• Reports a vulnerability when a node holds one, and records in the evidence each such node with its type, the kind of secret and the parameter or notes where it sits, never the secret itself; 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
Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' pentesting team, fill out this contact form.