CVE-2025-52478 — Stored XSS in n8n — CVE Details
Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.72%). Schedule for your next planned update.
Does your project use an affected n8n version?
Paste your package-lock.json to check it for CVE-2025-52478 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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:
- Configure a reverse proxy to serve webhook requests from a different domain [docs].
- Disable or restrict use of the Form Trigger node, particularly the HTML element type.
- Use a Content Security Policy (CSP) to block execution of inline scripts and disallow use of
srcdoc.
References
Advisory Timeline
- First published August 19, 2025 (464 days ago).
- Last revised August 19, 2025 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install n8n@1.98.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| n8n npm · Affected: All versions | 1.98.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.7 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
References
Frequently Asked Questions
- What is CVE-2025-52478?
- Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.7/10).
- How do I check if my project is affected by CVE-2025-52478?
- CVE-2025-52478 affects n8n. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-52478 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 49.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-25115CRITICAL
n8n has a Python sandbox escape
- CVE-2026-27497CRITICAL
n8n has Potential Remote Code Execution via Merge Node
- CVE-2026-72772HIGH
n8n: Account Takeover via Unverified Email Claim in Token Exchange Embed Login
- CVE-2026-59207HIGH
n8n: "Allowed HTTP Request Domains" Restriction Bypass via AI Agents MCP Connector
- CVE-2026-65591HIGH
n8n: Legacy Expression Evaluator Sanitizer Bypass Leads to Authenticated Code Execution
- CVE-2026-56360MEDIUM
n8n has Webhook Forgery on Zendesk Trigger Node
- CVE-2026-56356MEDIUM
n8n has XSS in Chat Trigger Node through Custom CSS
- CVE-2026-86084MEDIUM
n8n: Disabled OIDC SSO Endpoints Remain Active and Issue Valid Sessions