n8n, Stored Cross-Site Scripting Vulnerability (Critical)

Listen to this Post

The vulnerability exploits the “Respond to Webhook” node in n8n workflows. When configured to return HTML content, this node can include executable JavaScript within the response. n8n versions from 1.103.0 introduced a sandbox intended to isolate such content within an iframe, preventing script execution in the parent window. However, a flaw allows crafted HTML responses to bypass this sandbox containment. The injected scripts execute directly in the top-level window of the n8n editor interface instead of being confined. This occurs because the sandbox attributes on the iframe or the content security policy are insufficient to block script execution from the webhook response payload. An attacker with permissions to create or edit workflows can embed a malicious script within a webhook node’s HTML response. When an authenticated user, such as an administrator, triggers or views the workflow execution, the payload delivers and runs. The script operates within the user’s authenticated session context, with full access to the n8n editor DOM and API endpoints. Although the HttpOnly flag on session cookies prevents direct theft, the JavaScript can perform authenticated AJAX requests to the n8n backend. This enables actions like forging requests to read, modify, or delete workflows, or inject new nodes for data exfiltration. The vulnerability effectively combines stored XSS with CSRF capabilities within the application.
Platform: n8n
Version: <1.114.0
Vulnerability: Stored XSS
Severity: Critical
date: Not specified

Prediction: Patched v1.114.0

What Undercode Say:

Analytics

Check n8n version

curl -s http://localhost:5678/healthz | grep version

npm list n8n –global

Sample malicious webhook response payload

echo ‘‘

Identify vulnerable nodes in workflow JSON

grep -r “respondToWebhook” workflows/

How Exploit:

Create workflow with “Respond to Webhook” node. Set node to return HTML containing JavaScript payload. Trick authenticated user into triggering webhook URL. Payload executes in user’s session, performing unauthorized API calls.

Protection from this CVE

Upgrade to v1.114.0. Restrict workflow creation privileges. Sanitize HTML responses via proxy. Use content security policies.

Impact:

Workflow data theft. Unauthorized workflow modification. CSRF-like session attacks. Potential full compromise.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top