n8n: Stored XSS in Form Trigger enables phishing
Any authenticated n8n user with workflow edit rights can plant a persistent XSS payload in a public Form Trigger node, silently hijacking form submissions and phishing every visitor until patched. Upgrade to n8n 2.12.0, 2.11.2, or 1.123.25 immediately. If patching is delayed, lock down workflow creation to fully trusted users only and consider disabling the Form Trigger node entirely via NODES_EXCLUDE.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | >= 2.0.0-rc.0, < 2.11.2 | 2.11.2 |
Do you use n8n? You're affected.
Severity & Risk
Recommended Action
- 1. PATCH: Upgrade n8n to 2.12.0, 2.11.2 (2.x branch), or 1.123.25 (1.x branch) immediately.
- 2. AUDIT: Review all existing Form Trigger nodes for suspicious CSS or HTML content, especially inline styles or script-like patterns in form field definitions.
- 3. RBAC: Restrict workflow create/modify permissions to fully trusted users only — revoke from any accounts not strictly requiring it.
- 4. DISABLE: If upgrading is not immediately possible, add 'n8n-nodes-base.formTrigger' to the NODES_EXCLUDE environment variable to disable the node entirely.
- 5. MONITOR: Log all form trigger node creations and modifications; alert on changes by non-admin accounts.
- 6. VERIFY: After patching, confirm no malicious payloads persist in existing form configurations by re-exporting and inspecting workflow JSON.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
## Impact An authenticated user with permission to create or modify workflows could exploit a flaw in the Form Trigger node's CSS sanitization to store a cross-site scripting (XSS) payload. The injected script executes persistently for every visitor of the published form, enabling form submission hijacking and phishing. The existing Content Security Policy prevents direct n8n session cookie theft but does not prevent script execution or form action manipulation. ## Patches The issue has been fixed in n8n versions 2.12.0, 2.11.2, and 1.123.25. Users should upgrade to one of these versions or later to remediate the vulnerability. ## Workarounds If upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Limit workflow creation and editing permissions to fully trusted users only. - Disable the Form Trigger node by adding `n8n-nodes-base.formTrigger` to the `NODES_EXCLUDE` environment variable. These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Exploitation Scenario
A threat actor gains n8n credentials for a standard workflow creator account — via phishing, credential stuffing, or insider access. They modify an existing published workflow's Form Trigger node, embedding a JavaScript payload disguised as a CSS style value that bypasses the flawed sanitization. The form URL is shared broadly (via email, Slack, or embedded in a customer portal). Every user who opens the form executes the attacker's script: it silently clones the form submission and POSTs credentials or PII to an attacker-controlled endpoint before forwarding the user to the legitimate destination. In AI agent contexts, this intercepts data intended for downstream LLM processing — poisoning the agent's inputs while harvesting user data in parallel.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N References
- github.com/advisories/GHSA-q4fm-pjq6-m63g
- github.com/advisories/GHSA-q4fm-pjq6-m63g
- github.com/advisories/GHSA-q4fm-pjq6-m63g
- github.com/advisories/GHSA-q4fm-pjq6-m63g
- github.com/advisories/GHSA-q4fm-pjq6-m63g
- github.com/advisories/GHSA-q4fm-pjq6-m63g
- github.com/n8n-io/n8n/security/advisories/GHSA-q4fm-pjq6-m63g
- github.com/n8n-io/n8n/security/advisories/GHSA-q4fm-pjq6-m63g
- github.com/n8n-io/n8n/security/advisories/GHSA-q4fm-pjq6-m63g
- github.com/n8n-io/n8n/security/advisories/GHSA-q4fm-pjq6-m63g
- github.com/n8n-io/n8n/security/advisories/GHSA-q4fm-pjq6-m63g
- github.com/n8n-io/n8n/security/advisories/GHSA-q4fm-pjq6-m63g
AI Threat Alert