AgentbeamBeta
AI agent vulnerability · n8n

CVE-2025-61914: n8n's Possible Stored XSS in "Respond to Webhook" Node May Execute Outside iframe Sandbox

highCVSS 3.1 7.3GHSA-58jc-rcg5-95f3

n8n before 1.114.0 can run script from a Respond to Webhook node's HTML response in the top-level window instead of inside the sandbox added in 1.103.0. A user who can create workflows can use this to run JavaScript in another user's n8n editor session. Upgrade n8n to 1.114.0.

Published Dec 26, 2025 · Updated Dec 27, 2025 · Analysis Nov 24, 2026

What an attacker can do

The Respond to Webhook node can return HTML. Version 1.103.0 added an iframe sandbox for that HTML, so any script stays away from the editor. In affected versions, a payload could still execute in the top-level window, in the context of the n8n editor interface (CWE-79, stored XSS).

The attacker needs permission to create or edit workflows, and the victim must view the response while signed in. The score reflects that: low privileges and user interaction required. The session cookie n8n-auth is marked HttpOnly, so the script cannot copy it. It can still send requests from inside the victim's authenticated session, much like cross-site request forgery.

The advisory lists three results: reading sensitive workflow data or execution history, changing or deleting workflows, and inserting workflow logic that sends data to an outside host. n8n workflows often hold credentials and business data, and AI automations run through them. Instances that let untrusted users build workflows face the most risk. A single-owner instance with trusted builders has little exposure.

Who is affected

Affected: the npm package n8n, versions before 1.114.0. Version 1.114.0 is patched. The risk is highest when untrusted or semi-trusted users hold workflow creation rights and others open the resulting webhook responses in the editor session.

Check your version:

npm ls -g n8n
n8n --version

For Docker, check the image tag. Then review which users can create workflows, and which workflows use Respond to Webhook with an HTML body.

n8n

Ecosystem
npm
Affected
< 1.114.0
Fixed in
1.114.0
Check
npm ls n8n

How to fix it

Upgrade n8n to 1.114.0 or later:

npm install -g n8n@latest

For Docker, pull a current image tag. The advisory gives three workarounds if you cannot upgrade: restrict workflow creation and editing to trusted users, avoid untrusted HTML responses in the Respond to Webhook node, and filter responses that include executable scripts with an external reverse proxy or HTML sanitizer.

How to tell if you were hit

Review workflows that use Respond to Webhook and return HTML, especially ones created or edited by users you do not fully trust. Look for script tags, event handler attributes or inline JavaScript in the response body. Check the n8n audit trail and execution history for workflow changes, deletions and new outbound steps that no one on your team made.

The sources give no log signature for a successful attack.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

A stored Cross-Site Scripting (XSS) vulnerability may occur in n8n when using the “Respond to Webhook” node. When this node responds with HTML content containing executable scripts, the payload may execute directly in the top-level window, rather than within the expected sandbox introduced in version 1.103.0.

This behavior can enable a malicious actor with workflow creation permissions to execute arbitrary JavaScript in the context of the n8n editor interface.

While session cookies (n8n-auth) are marked HttpOnly and cannot be directly exfiltrated, the vulnerability can facilitate Cross-Site Request Forgery (CSRF)-like actions from within the user’s authenticated session, potentially allowing:

  • Unauthorized reading of sensitive workflow data or execution history.
  • Unauthorized modification or deletion of workflows.
  • Insertion of malicious workflow logic or external data exfiltration steps.

n8n instances that allow untrusted users to create workflows are particularly impacted.

Patches

The vulnerability has been patched in v.1.114.0.

Workarounds

  • Restrict workflow creation and modification privileges to trusted users only.
  • Avoid using untrusted HTML responses in the “Respond to Webhook” node.
  • Use an external reverse proxy or HTML sanitizer to filter responses that include executable scripts.

Credited to nlgbao1340.

Questions

Which n8n version fixes CVE-2025-61914?

1.114.0. Versions before 1.114.0 are affected. The iframe sandbox that was meant to contain this HTML arrived in 1.103.0 but did not always hold.

Can the attacker steal my n8n session cookie?

Not directly. The advisory says the n8n-auth cookie is HttpOnly. The script can still act from inside your session, reading workflow data and changing or deleting workflows.

Who is most at risk?

Instances where untrusted users can create workflows. The attacker needs workflow creation permission, so a tightly controlled instance has far less exposure.

Is CVE-2025-61914 exploited in the wild?

The sources do not say so. The entry has no CISA catalog data, and the EPSS score is about 0.2 percent.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries