要点
- CVE-2025-52478 是影响 n8n (n8n), n8n 的中危 (CVSS 5.4)漏洞。
- 未来 30 天内被利用的概率(EPSS):0.39%,高于 33.5% 的漏洞。
- 修复:升级到 1.98.2 或更高版本。
| Package | Affected versions | Patched versions |
|---|
| n8n | ≥ 1.77.0, < 1.98.2
| 1.98.2
|
| n8n npm | ≥ 1.77.0, < 1.98.2
| 1.98.2
|
Description
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
NVD description
n8n is a workflow automation platform. From 1.77.0 to before 1.98.2, 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. Users should upgrade to version >= 1.98.2.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free