CVE-2025-52478
JSON

8.7high

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

Severity
8.7high CVSS:3.1 by GitHub_M
Exploit likelihood
0.48% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-hfmv-hhh3-43f2

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.

Affected

Product or packageVersionsReported by
n8n-io n8n>= 1.77.0, < 1.98.2CVE List
n8n (npm)from 1.77.0 before 1.98.2GitHub Advisory Database
n8n n8nfrom 1.77.0 before 1.98.2NVD

All scores

GitHub_M8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
GitHub8.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
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 (es)

n8n es una plataforma de automatización de flujos de trabajo. Desde la versión 1.77.0 hasta la 1.98.2, se identificó una vulnerabilidad de cross site scripting (XSS) almacenado en n8n, específicamente en el elemento HTML del formulario del nodo Form Trigger. Un atacante autenticado puede inyectar HTML malicioso mediante un con un payload srcdoc que incluye la ejecución arbitraria de JavaScript. El atacante también puede inyectar JavaScript malicioso mediante el uso de &lt;video&gt; acoplado a &lt;source&gt; mediante un evento onerror. Al usar un iframe o una combinación de video y etiqueta source, esta vulnerabilidad permite la apropiación de cuentas (ATO) mediante la exfiltración de n8n-browserId y cookies de sesión de usuarios autenticados que visitan un formulario manipulado con fines maliciosos. Con estos tokens y cookies, un atacante puede suplantar la identidad de la víctima y cambiar los detalles de la cuenta, como las direcciones de correo electrónico, lo que le otorga control total sobre la cuenta, especialmente si la autenticación de dos factores (A2F) no está habilitada. Los usuarios deben actualizar a la versión 1.98.2 o superior.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-52478 changed 2025-08-19CVE Terms of Use
GitHub Advisory DatabaseGHSA-hfmv-hhh3-43f2 changed 2025-08-19CC-BY-4.0
NVDCVE-2025-52478 changed 2026-06-17Public domain