GHSA-HFMV-HHH3-43F2

Vulnerability from github – Published: 2025-08-19 15:33 – Updated: 2025-08-19 20:58
VLAI?
Summary
Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source
Details

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

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "n8n"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.77.0"
            },
            {
              "fixed": "1.98.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-52478"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-08-19T15:33:35Z",
    "nvd_published_at": "2025-08-19T17:15:40Z",
    "severity": "HIGH"
  },
  "details": "### 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\u0027s **HTML form element**. An authenticated attacker can inject malicious HTML via an `\u003ciframe\u003e` with a `srcdoc` payload that includes arbitrary JavaScript execution. The attacker can also inject malicious Javascript by using `\u003cvideo\u003e` coupled `\u003csource\u003e` 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\u2014especially 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 \u003e=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)",
  "id": "GHSA-hfmv-hhh3-43f2",
  "modified": "2025-08-19T20:58:33Z",
  "published": "2025-08-19T15:33:35Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/n8n-io/n8n/security/advisories/GHSA-hfmv-hhh3-43f2"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-52478"
    },
    {
      "type": "WEB",
      "url": "https://github.com/n8n-io/n8n/pull/16329"
    },
    {
      "type": "WEB",
      "url": "https://github.com/n8n-io/n8n/commit/7940384a85041a1890b1203d69c092c887312500"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/n8n-io/n8n"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Stored XSS in n8n Form Trigger allows Account Takeover via injected iframe and video/source"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…