n8n
Affected
- introduced
1.77.0, fixed1.98.2(semver)
Fixed versions
1.98.2
Fix
- Fixed version
1.98.2npm install [email protected]
Advisory
Also known as: CVE-2025-52478
Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source
Impact
A stored Cross-Site Scripting (XSS) vulnerability was identified in n8n, specifically in the Form Trigger node's HTML form element. An authenticated attacker can inject malicious HTML via an <iframe> with a srcdoc payload that includes arbitrary JavaScript execution. The attacker can also inject malicious Javascript by using <video> coupled <source> using an onerror event.
While using iframe or a combination of video and source tag, this vulnerability allows for Account Takeover (ATO) by exfiltrating n8n-browserId and session cookies from authenticated users who visit a maliciously crafted form. Using these tokens and cookies, an attacker can impersonate the victim and change account details such as email addresses, enabling full control over the account—especially if 2FA is not enabled.
Patches
The issue was addressed in PR #16329. Users should upgrade to version >=1.98.2.
Workarounds
Apart from updating to the fixed version, n8n instance administrators can:
srcdoc.References
High Basis: The source's own band: HIGH
1.77.0, fixed 1.98.2 (semver)1.98.2
1.98.2npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0