After updating to 1.103.2 webhook responce node add iframe wrapper

Describe the problem/error/question

I have multiple workflows that return text or piece of code and now my workflow change behaviour.

This is the value returned now

iframe srcdoc="Hi, how are you?" sandbox="allow-scripts allow-forms allow-popups allow-modals allow-orientation-lock allow-pointer-lock allow-presentation allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"
			style="position:fixed; top:0; left:0; width:100vw; height:100vh; border:none; overflow:auto;"
			allowtransparency="true"
/iframe

This is what i’m expecting to be returned

Hi, how are you?

This is documented here

this behavior should be optional.
I completely understand why you decide to add this constraint to avoid xss and other orrible things but is very damaging in every workflows that already return text or other stuff like json.

Edit:

After this post I discover that if I pick return json it does not even require to return json formatted stuff so every reason you decide to add this constraint can be baypassed switching to return json type.
I absolutely se no point in this change and from a security point of view is not even good.

What is the error message (if any)?

They change a component without any backwords compatibility

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.103.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker image
  • Operating system: linux

Not saying it is a good change, or even adequately explained, but it was announced (at least) here

1 Like

Yeah from their side at least they document it and announce it.
I’m still here yelling at the cloud.
The implementation they did was poor because they didn’t actually solve the issue since I can still shoot in my foot using json fields.

I think that’s perfectly legit. They’d go on thinking everything is ok if nobody yelled. It’s probably something the devs just didn’t consider. I’ve lost count of how many times something I’ve written has been nuked by a change that was done in the name of “security.” I’m pretty sure to get a job in data security you must prove that you’ve installed a double-walled steel door with deadbolts, padlocks, cameras w/ 24/7 monitoring, and an access approval policy on the bathrooms inside your own house.

Haha yeah, I’ll keep yelling as long as it takes. I just wish the fix had actually closed the loophole. Feels like they put a sign up that says “don’t shoot yourself” but left the gun loaded on the table. Appreciate the backup though, maybe enough noise will get it properly fixed.

FWIW, here’s another post about this.

Based on the last release note, there is a fix for this?

1.104.2 (2025-07-31)

Bug Fixes
Webhook Node: Don't wrap response in an iframe if it doesn't have HTML

Features
Env to disable webhook response iframe sandboxing (#17851) (c9e291a)
2 Likes

We removed the iframe wrapper from responses that don’t contain html / JavaScript so an update should resolve it.

The other issue with html being wrapped in an iframe which has an env option to remove is likely unrelated looking at your description, if you do look to add the env option though make sure you fully understand the risks.

1 Like

good jobs folks!
Thanks for the info and the great work!

What are the risks? What’s the context around why this feature was implemented?

StocktonF
A webhook might be hosted in the same domain as the main n8n instance rather than on a separate subdomain. This means it can access the local settings and cookies of the main application. If I install or copy a malicious workflow, and that workflow opens the webhook while I have an active session, it could easily steal my cookies and session data. As a result, I could lose full access to my n8n instance.
Since this tool is also used by non-expert developers, the use of an iframe helps block access to the main website context and protects users from accidentally compromising their own setup.

Makes sense. Thanks for breaking it down :slight_smile:

IE.
This workflow display your cookies escaping the jail they have created.

Safe to run because does not send this cookies.

jon please escape also svg

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.