MEDIUM 5.4

CVE-2026-54302: n8n Chat Trigger Stored XSS Vulnerability

n8n, a popular open-source workflow automation platform, contains a stored cross-site scripting (XSS) vulnerability in its Chat Trigger feature. An authenticated user with permission to edit workflows can inject malicious JavaScript code by manipulating the webhookId parameter. When another logged-in user visits the generated chat URL, that injected code executes within the n8n application context, giving the attacker access to the victim's session and permissions. The vulnerability requires both authentication and user interaction to exploit, limiting its immediate blast radius but remaining a meaningful risk in multi-tenant or shared n8n deployments.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-79
Affected products
1 configuration(s)
Published / Modified
2026-06-23 / 2026-06-26

NVD description (verbatim)

n8n is an open source workflow automation platform. Prior to 1.123.55, 2.25.7, and 2.26.2, an authenticated user with workflow edit access could inject arbitrary JavaScript into the Chat Trigger's generated page by setting a malicious webhookId. When a logged-in user visited the chat URL, the injected code executed in the n8n origin with that user's session privileges. This vulnerability is fixed in 1.123.55, 2.25.7, and 2.26.2.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The Chat Trigger component in n8n fails to properly sanitize the webhookId parameter when generating its public-facing page. An authenticated workflow editor can craft a malicious webhookId containing JavaScript payloads. Because the page renders this value without adequate output encoding or Content Security Policy protections, the payload executes in the n8n origin with full access to the victim user's session cookies and token. The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) and carries a CVSS v3.1 score of 5.4 (Medium severity), reflecting the requirement for valid credentials and user interaction to trigger exploitation.

Business impact

In environments where n8n is deployed as a centralized automation platform accessed by multiple team members, this vulnerability enables lateral privilege escalation and data theft. A disgruntled or compromised low-privilege workflow editor could silently inject code to steal API keys, credentials, or workflow data from colleagues' sessions. In SaaS or managed n8n instances, this creates cross-tenant contamination risk if workflows can be shared. The stored nature of the injection means the attack persists until the malicious workflow is removed, potentially affecting every user who interacts with that chat trigger over days or weeks.

Affected systems

n8n versions prior to 1.123.55 (legacy branch), 2.25.7, and 2.26.2 (current releases) are vulnerable. All deployment models are affected: self-hosted, Docker, and cloud-managed instances. Any n8n environment where users with workflow editing permissions exist alongside users who visit chat URLs faces risk. The vulnerability does not require internet exposure; it affects internal deployments equally if multiple authenticated users share access.

Exploitability

Exploitation is moderately straightforward but requires a foothold: the attacker must have valid n8n credentials and permission to edit or create workflows. No zero-click exploitation is possible; the victim must visit a chat URL knowingly or through social engineering. Once those conditions are met, injecting JavaScript into the webhookId is trivial—no special tooling or advanced techniques required. The execution occurs in a high-privilege context (the n8n origin with the victim's session), amplifying impact. Real-world exploitation likelihood increases in organizations with permissive workflow access controls or where chat triggers are widely shared.

Remediation

Upgrade immediately to n8n 1.123.55, 2.25.7, or 2.26.2 or later, depending on your current version branch. Before patching, restrict workflow edit permissions to trusted users and audit existing workflows for suspicious webhookId values (look for characters like script tags, HTML entities, or unusual URL encoding in webhook configurations). If you cannot patch immediately, consider disabling Chat Trigger functionality or implementing network-level access controls to limit who can visit chat URLs. Review audit logs for workflow modifications by lower-privileged accounts.

Patch guidance

Identify your current n8n version (visible in the UI or via version API). If running 1.x, upgrade to 1.123.55 or later; if running 2.x before 2.25.7, upgrade to 2.25.7 or 2.26.2 or later. Follow n8n's official upgrade documentation for your deployment method. For Docker deployments, update the image tag and recreate containers. For npm-based installations, run npm update n8n to the patched version. Test Chat Trigger functionality in a staging environment before production deployment. No data migration or configuration changes are required; patches are backward-compatible.

Detection guidance

Monitor n8n audit logs for workflow modifications, particularly changes to Chat Trigger webhookId fields by non-administrative users. Search logs for webhookId values containing HTML metacharacters, script tags, or encoded JavaScript patterns. Check for unusual visit patterns to chat URLs shortly after workflow modifications. In web application firewall (WAF) logs, flag requests to n8n chat endpoints containing unencoded JavaScript or event handler attributes in parameters. If n8n is self-hosted, enable verbose logging in the Chat Trigger handler to capture all webhookId values processed.

Why prioritize this

Assign this a high priority on systems with collaborative workflow environments but lower priority on single-user or tightly access-controlled deployments. The CVSS score of 5.4 reflects the authentication and user interaction requirements, but the *impact* of successful exploitation—session hijacking and credential theft—justifies treating it as critical in multi-user settings. Prioritize patching any n8n instance used by your security, finance, or HR teams where automation workflows handle sensitive data. If you use n8n only for non-sensitive orchestration with few users, this can follow standard patching cadence.

Risk score, explained

The CVSS v3.1 score of 5.4 (Medium) appropriately reflects the vulnerability's constrained attack vector: it requires an authenticated attacker with workflow edit permissions (PR:L) and relies on user interaction (UI:R). However, the score's Medium rating understates the potential damage in real deployments. The changed scope (S:C) indicates the attack transcends normal boundaries by executing with a victim's session privileges in a shared application context. Organizations should supplement the base CVSS with risk modeling that accounts for the number of workflow editors in your environment, the sensitivity of data flowing through n8n, and the feasibility of achieving broad user interaction with malicious chat URLs.

Frequently asked questions

Can this vulnerability be exploited if I disable or don't use the Chat Trigger feature?

No. The vulnerability exists specifically within the Chat Trigger component. If your workflows do not use Chat Trigger, you are not exposed. However, verify this by checking your workflow definitions; Chat Triggers may be present even if not actively in use.

Do I need to rotate credentials if I patch, or should I assume they were stolen?

That depends on your environment's access controls and log retention. If you identify evidence of exploitation in audit logs, immediately rotate API keys and credentials used within affected workflows. If you patch proactively without finding suspicious activity, credential rotation is precautionary but not strictly necessary. Review your logs carefully before deciding.

What is the difference between the three patched versions (1.123.55, 2.25.7, 2.26.2)?

These represent n8n's versioning branches: 1.x is legacy, 2.25.x and 2.26.x are current releases. Upgrade to the latest version within your current branch. If running 1.x, plan a migration to 2.x in the near term, as 1.x will eventually reach end-of-life.

If I'm using a managed/cloud-hosted n8n service, do I need to do anything?

Contact your n8n service provider to confirm they have deployed the patched versions to your tenant. Most managed services auto-upgrade, but verification is prudent given the vulnerability's cross-tenant implications.

This analysis is based on the official CVE record and n8n vendor advisories as of June 2026. CVSS scores are provided by NIST/NVD and represent a baseline risk assessment; organizations should apply their own risk models based on deployment context. Patch version numbers and affected versions are sourced from vendor documentation; verify compatibility with your environment before applying updates. SEC.co makes no warranty regarding the completeness or timeliness of this intelligence. Always consult vendor advisories and security bulletins for the most current remediation guidance. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).