CVE-2026-25054 Overview
CVE-2026-25054 is a Cross-Site Scripting (XSS) vulnerability in n8n, an open source workflow automation platform. The vulnerability exists in a markdown rendering component used throughout n8n's interface, including workflow sticky notes and other areas that support markdown content. An authenticated user with permission to create or modify workflows can exploit this vulnerability to execute arbitrary scripts with same-origin privileges when other users interact with a maliciously crafted workflow.
Critical Impact
This vulnerability enables session hijacking and account takeover through malicious script execution in the context of other authenticated users' sessions.
Affected Products
- n8n versions prior to 1.123.9
- n8n versions prior to 2.2.1
- n8n for Node.js (all affected versions)
Discovery Timeline
- 2026-02-04 - CVE-2026-25054 published to NVD
- 2026-02-05 - Last updated in NVD database
Technical Details for CVE-2026-25054
Vulnerability Analysis
This stored Cross-Site Scripting (XSS) vulnerability (CWE-79) resides in n8n's markdown rendering component. The vulnerability allows authenticated attackers to inject malicious JavaScript code that executes in the browsers of other users who view or interact with the compromised workflow. The attack requires network access and low privileges (authenticated user with workflow creation/modification permissions), combined with user interaction from the victim who must access the malicious workflow content.
The vulnerability is particularly concerning in multi-user n8n deployments where workflows are shared between team members. When a victim user views a workflow containing the malicious markdown payload—such as viewing a sticky note with embedded XSS—the injected script executes with the victim's session context. This enables the attacker to steal session tokens, perform actions on behalf of the victim, or escalate privileges within the n8n platform.
Root Cause
The root cause of this vulnerability is insufficient input sanitization in the markdown rendering component. When processing markdown content for display in sticky notes and other UI elements, the component fails to properly sanitize or escape malicious HTML and JavaScript payloads. This allows attackers to craft markdown content containing executable scripts that bypass the intended content security boundaries.
Attack Vector
The attack requires an authenticated user with workflow creation or modification permissions to inject malicious markdown content into a workflow. The attacker can leverage several injection points within n8n's interface:
- Workflow Sticky Notes - Text annotations added to workflows that support markdown formatting
- Other Markdown-Enabled Areas - Any interface component that renders user-supplied markdown content
When another authenticated user accesses the workflow containing the malicious markdown, the embedded script executes in their browser context. This enables the attacker to:
- Capture session cookies and authentication tokens
- Perform unauthorized actions using the victim's credentials
- Exfiltrate sensitive data visible to the victim
- Potentially escalate to full account takeover
The attack leverages the trust relationship between users sharing workflows, making it particularly effective in collaborative environments. For technical details on the vulnerability mechanism, refer to the GitHub Security Advisory.
Detection Methods for CVE-2026-25054
Indicators of Compromise
- Unusual JavaScript payloads in workflow sticky notes or markdown-enabled fields
- Suspicious workflow modifications by users who don't typically edit certain workflows
- Session tokens appearing in outbound network requests to unauthorized destinations
- Unexpected user activity patterns indicating potential session hijacking
Detection Strategies
- Monitor workflow audit logs for creation or modification of workflows containing suspicious markdown content with script tags or event handlers
- Implement Content Security Policy (CSP) headers to detect and block inline script execution attempts
- Review access logs for unusual patterns of workflow access, particularly by users who don't normally collaborate
- Deploy web application firewalls (WAF) with XSS detection rules to identify malicious payloads
Monitoring Recommendations
- Enable comprehensive audit logging for all workflow creation and modification events
- Configure alerts for workflows containing potential XSS patterns such as <script>, javascript:, or event handlers like onerror
- Monitor for unusual session activity that may indicate compromised credentials from successful XSS attacks
- Regularly review shared workflows for unauthorized or suspicious content modifications
How to Mitigate CVE-2026-25054
Immediate Actions Required
- Upgrade n8n to version 1.123.9 or later for 1.x deployments
- Upgrade n8n to version 2.2.1 or later for 2.x deployments
- Audit existing workflows for suspicious markdown content that may contain malicious scripts
- Review user access logs for signs of exploitation or unauthorized access
Patch Information
n8n has released security patches addressing this vulnerability in versions 1.123.9 and 2.2.1. Organizations should upgrade to these patched versions immediately to remediate the XSS vulnerability. Detailed patch information and upgrade instructions are available in the n8n Security Advisory.
Workarounds
- Restrict workflow creation and modification permissions to trusted users only until patches can be applied
- Implement network-level controls to limit which users can access shared workflows
- Review and audit all existing workflow sticky notes and markdown content for potentially malicious payloads
- Consider temporarily disabling markdown rendering in sticky notes if possible through configuration
# Upgrade n8n to patched version
npm update n8n@1.123.9
# Or for 2.x installations
npm update n8n@2.2.1
# Verify installed version
n8n --version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

