n8n: DOM-Based XSS via Unsandboxed iframe srcdoc in HTML Preview
The HTML preview renders execution output into an iframe srcdoc without sandbox, so a sanitizer bypass lets injected script run same-origin as the editor. When a victim opens the preview, it can call authenticated APIs with their session. An account with global:member privileges can exploit it.
The issue has been fixed in n8n versions 1.123.64, 2.29.8, and 2.30.1. Users should upgrade to one of these versions or later to remediate the vulnerability.
If upgrading is not immediately possible, administrators should consider the following temporary mitigations:
N8N_CONTENT_SECURITY_POLICY environment variable to a policy that blocks inline scripts.These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
为什么是这个 VPI(可解释·实验性)
VPI 计算依据
| 影响度(严重程度等级估算值) | 80.00 |
| 利用信号(无额外利用信号) | ×1.00 |
| VPI | 80.00 |
VPI 公式 vpi-v1