Skip to main content

CVE-2025-52478 — Stored XSS in n8n — CVE Details

HIGH

Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source

Published August 19, 2025Updated August 19, 2025Source: OSV

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.

Check my package-lock.json

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
Update n8n to 1.98.2 or later
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).

PackageFixed In
n8n npm · Affected: All versions1.98.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.7 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

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

CVSS Score
8.7

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.72%
EPSS percentile: 49.4

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

GHSA-hfmv-hhh3-43f2

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json