CVE-2026-25054
📋 TL;DR
This Cross-Site Scripting (XSS) vulnerability in n8n allows authenticated users with workflow permissions to inject malicious scripts into markdown content. When other users interact with compromised workflows, these scripts execute with same-origin privileges, potentially leading to session hijacking and account takeover. All n8n instances running vulnerable versions are affected.
💻 Affected Systems
- n8n
📦 What is this software?
N8n by N8n
N8n by N8n
⚠️ Risk & Real-World Impact
Worst Case
Complete account takeover of administrators or other users, leading to data theft, privilege escalation, and full compromise of the n8n instance.
Likely Case
Session hijacking of users who interact with malicious workflows, potentially leading to unauthorized workflow modifications or data access.
If Mitigated
Limited impact if proper authentication controls and user permissions are enforced, restricting which users can create/modify workflows.
🎯 Exploit Status
Exploitation requires authenticated access and workflow permissions. The vulnerability is in markdown rendering, making injection straightforward for users with appropriate access.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.123.9 or 2.2.1
Vendor Advisory: https://github.com/n8n-io/n8n/security/advisories/GHSA-qpq4-pw7f-pp8w
Restart Required: Yes
Instructions:
1. Stop n8n service. 2. Update to n8n version 1.123.9 (for v1.x) or 2.2.1 (for v2.x). 3. Restart n8n service. Update method depends on installation type (npm update, Docker pull, etc.).
🔧 Temporary Workarounds
Restrict workflow permissions
allLimit which users can create or modify workflows to trusted administrators only.
Disable markdown features
allIf possible, disable markdown rendering in workflow sticky notes and other affected components.
🧯 If You Can't Patch
- Implement strict Content Security Policy (CSP) headers to prevent script execution from untrusted sources.
- Monitor and audit workflow modifications for suspicious markdown content containing script tags or JavaScript.
🔍 How to Verify
Check if Vulnerable:
Check n8n version via web interface or command line. If version is below 1.123.9 (for v1.x) or 2.2.1 (for v2.x), the system is vulnerable.
Check Version:
npx n8n --version (for npm installs) or check Docker image tag
Verify Fix Applied:
After updating, verify version is 1.123.9 or higher (v1.x) or 2.2.1 or higher (v2.x). Test markdown rendering with script tags to ensure they are properly sanitized.
📡 Detection & Monitoring
Log Indicators:
- Unusual workflow modifications, especially to markdown content
- Multiple failed login attempts followed by workflow changes
Network Indicators:
- Unexpected JavaScript execution in n8n interface
- Suspicious outbound connections from n8n instance
SIEM Query:
source="n8n" AND (event="workflow_updated" OR event="workflow_created") AND user!="admin"