{"id":"CVE-2025-52478","aliases":["CVE-2025-52478","GHSA-hfmv-hhh3-43f2"],"related":[],"kind":"vulnerability","state":"published","title":"Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA stored **Cross-Site Scripting (XSS)** vulnerability was identified in [n8n](https://github.com/n8n-io/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.\n\nWhile 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.\n\n### Patches\nThe issue was addressed in [PR #16329](https://github.com/n8n-io/n8n/pull/16329). Users should upgrade to version >=1.98.2.\n\n### Workarounds\nApart from updating to the fixed version, n8n instance administrators can:\n- Configure a reverse proxy to **serve webhook requests from a different domain** [[docs](https://docs.n8n.io/hosting/configuration/configuration-examples/webhook-url/)].\n- Disable or restrict use of the **Form Trigger node**, particularly the **HTML** element type.\n- Use a Content Security Policy (CSP) to block execution of inline scripts and disallow use of `srcdoc`.\n\n### References\n- [OWASP XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/XSS_Prevention_Cheat_Sheet.html)\n- [MDN: iframe `srcdoc` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-srcdoc)\n- [HTML: `onerror` attribute](https://html.spec.whatwg.org/multipage/webappapis.html#handler-onerror)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-08-19T15:33:35.000Z","modified":"2026-06-17T09:36:34.183Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 1.77.0, < 1.98.2","status":"affected"}],"vendor":"n8n-io","product":"n8n","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.77.0","status":"affected","fixed":"1.98.2"}],"ecosystem":"npm","package":"n8n","purl":"pkg:npm/n8n","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.77.0","fixed":"1.98.2"}],"vendor":"n8n","product":"n8n","cpe":"cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-hfmv-hhh3-43f2","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/n8n-io/n8n/pull/16329","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/n8n-io/n8n/commit/7940384a85041a1890b1203d69c092c887312500","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-52478","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/n8n-io/n8n","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-08-19T19:18:07.533Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-52478","url":"https://www.cve.org/CVERecord?id=CVE-2025-52478","licence":"CVE Terms of Use","modified":"2025-08-19T19:18:13.300Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hfmv-hhh3-43f2","url":"https://github.com/advisories/GHSA-hfmv-hhh3-43f2","licence":"CC-BY-4.0","modified":"2025-08-19T20:58:33.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-52478","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-52478","licence":"Public domain","modified":"2026-06-17T09:36:34.183Z"}],"updatedAt":"2026-11-25T22:59:02.784Z","epss":{"score":0.00481,"percentile":0.43143,"date":"2026-12-01T12:00:22.000Z"}}