CVE-2026-25054

5.4 MEDIUM

📋 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

Products:
  • n8n
Versions: All versions prior to 1.123.9 and 2.2.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with workflow creation/modification permissions. Affects all deployment methods (Docker, npm, etc.).

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

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

all

Limit which users can create or modify workflows to trusted administrators only.

Disable markdown features

all

If 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"

🔗 References

📤 Share & Export