CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Dashboard
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-JH8H-6C9Q-7GMW
4.2

The Empty Badge: n8n Chat Trigger Auth Bypass

Alon Barad
Alon Barad
Software Engineer

Feb 27, 2026·6 min read·11 visits

PoC Available

Executive Summary (TL;DR)

The Chat Trigger node in n8n checked if an auth cookie existed but didn't verify it. Attackers can bypass authentication by sending a request with `Cookie: n8n-auth=anything`, triggering potentially sensitive workflows without credentials.

n8n, the popular workflow automation tool that serves as the central nervous system for many modern tech stacks, suffered from a critical logic flaw in its Chat Trigger node. The vulnerability allowed attackers to bypass authentication simply by providing a cookie—any cookie. The system checked for the *presence* of an authentication token but failed to validate its *contents* or signature, effectively treating a cardboard badge the same as a valid ID card.

The Hook: When Automation Meets Blind Trust

Automation tools like n8n are the silent workhorses of the internet. They glue APIs together, move data between databases, and occasionally, they talk to humans. The Chat Trigger node is specifically designed for the latter—it allows users to interact with workflows via a chat interface. It's a fantastic feature that turns a static script into an interactive bot.

But here is the rub: when you expose a workflow to the internet, you are effectively opening a door into your internal infrastructure. If that door has a lock, you expect it to work. In this case, the lock was painted on.

This vulnerability isn't a complex memory corruption bug or a deep cryptographic failure. It is a logic error so simple it hurts. It fundamentally undermines the trust model of the application, allowing anyone who knows where the door is to walk right in, provided they knock in a very specific, low-effort way.

The Flaw: Authentication by Presence

In security engineering, we often talk about "Authentication vs. Authorization." But before we even get there, we have a more primal concept: Verification. The root cause of this vulnerability is a classic case of "Authentication by Presence."

When the Chat Trigger node is configured to use n8n User Auth, it expects the user to be logged in. The code responsible for this check resides in packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/GenericFunctions.ts. The logic was intended to gatekeep access, ensuring only legitimate users could trigger the workflow.

However, the developers made a fatal assumption. They assumed that if a cookie named n8n-auth existed in the request headers, the user must be authenticated. They forgot the most important part: checking if the cookie is actually valid, signed, and belongs to a real session. It's the digital equivalent of a bouncer letting you into a club because you're holding a piece of paper—it doesn't matter that the paper is a gum wrapper, as long as you're holding something.

The Code: The Smoking Gun

Let's look at the TypeScript that caused the headache. This is a perfect example of how a single missing line of code can negate an entire security model.

The Vulnerable Code:

// The code retrieves the cookie
const authCookie = getCookie('n8n-auth');
 
// The logic check
if (!authCookie && webhookName !== 'setup') {
    // If NO cookie exists, throw an error
    throw new ChatTriggerAuthorizationError(500, 'User not authenticated!');
}
 
// ... Execution continues happily ...

Do you see the gap? The code checks !authCookie. If authCookie is defined (i.e., not null, not undefined, not empty string), the if block is skipped. The code assumes that existence implies validity. There is no call to a session manager, no JWT verification, nothing.

The Fix:

The patch introduces the missing step: actually validating the token.

const authCookie = getCookie('n8n-auth');
 
// Still check existence
if (!authCookie) {
    throw new ChatTriggerAuthorizationError(401, 'User not authenticated!');
}
 
// The new mandatory check
try {
    await context.validateCookieAuth(authCookie);
} catch {
    throw new ChatTriggerAuthorizationError(401, 'Invalid authentication token');
}

By adding context.validateCookieAuth(authCookie), the system now cryptographically verifies the session. If you send a garbage cookie now, it throws a 401.

The Exploit: Knocking with a Wet Noodle

Exploiting this is embarrassingly easy. You don't need Metasploit, you don't need a disassembler, and you certainly don't need a PhD in cryptography. You just need curl.

Imagine you find an n8n instance with a Chat Trigger endpoint. Usually, these look something like https://n8n.target.com/webhook/your-chat-trigger-uuid. If you try to access it normally, you might get a 500 or 403 error saying "User not authenticated!"

To bypass this, we simply inject a cookie. Any cookie. It doesn't need to be a JWT. It doesn't need to be base64 encoded. It can be the word "pwned".

Attack Scenario Diagram:

Proof of Concept:

curl -X POST https://target-n8n.com/webhook/chat-endpoint \
     -H "Cookie: n8n-auth=LetMeIn" \
     -H "Content-Type: application/json" \
     -d '{"message": "Execute Order 66"}'

If the node is vulnerable, it will process the input as if it came from the system administrator.

The Impact: Why Should We Panic?

The CVSS score for this is technically "Medium" (4.2) because the Chat Trigger node must be explicitly configured to use n8n User Auth (which is not the default). However, do not let the low score fool you into complacency.

If an organization does use this feature, they likely use it to gatekeep internal tools. A Chat Trigger might be connected to an LLM that has access to internal documentation, or it might trigger DevOps pipelines.

Potential Consequences:

  • Data Exfiltration: If the workflow returns data (e.g., "Summarize the latest sales report"), an attacker can retrieve it.
  • Internal Access: The workflow runs with the permissions of the n8n instance. If n8n has AWS credentials or database access, the attacker can leverage the workflow to abuse those permissions.
  • Resource Consumption: An attacker could spam the endpoint, triggering heavy workflows (like LLM processing) to cause a denial of wallet or service.

It is a classic pivot point: a small hole in a non-critical component that leads to the compromise of the critical infrastructure behind it.

The Fix: Closing the Door

The remediation is straightforward: upgrade. The n8n team patched this in versions 1.123.22, 2.9.3, and 2.10.1. These versions enforce the validation logic we discussed earlier.

Mitigation Strategies:

  1. Patch: Apply the update immediately. This is the only way to ensure the code logic is correct.
  2. Reconfigure: If you cannot patch right now, go to your Chat Trigger nodes. Change the authentication mode from n8n User Auth to Basic Auth or handle authentication within the workflow itself (though that is risky).
  3. Network Segregation: Ensure your n8n webhook endpoints are not exposed to the public internet unless absolutely necessary. Use a WAF or a VPN to restrict access to trusted IPs.

This vulnerability serves as a stark reminder: checking for the existence of a credential is never enough. Always verify your inputs, especially when that input is the key to the castle.

Official Patches

n8nPull Request containing the fix

Fix Analysis (1)

Technical Appendix

CVSS Score
4.2/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected Systems

n8n (Self-hosted)n8n (Cloud)

Affected Versions Detail

Product
Affected Versions
Fixed Version
n8n
n8n
< 1.123.221.123.22
n8n
n8n
>= 2.0.0, < 2.9.32.9.3
n8n
n8n
>= 2.10.0, < 2.10.12.10.1
AttributeDetail
Bug ClassAuthentication Bypass
Attack VectorNetwork (Web)
Root CauseImproper Validation of Cookie Existence vs. Validity
CVSS v3.14.2 (Medium)
CVSS v4.02.3 (Low)
ComponentChat Trigger Node

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1553Subvert Trust Controls
Defense Evasion
CWE-287
Improper Authentication

Known Exploits & Detection

ManualSend a POST request to the chat webhook URL with 'Cookie: n8n-auth=1' header.

Vulnerability Timeline

Fix bundled in release 2026-W7
2026-02-25
GHSA Advisory Published
2026-02-26
Patched versions 1.123.22, 2.9.3, and 2.10.1 released
2026-02-26

References & Sources

  • [1]GitHub Advisory GHSA-jh8h-6c9q-7gmw
  • [2]Fix Commit 062644e

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.