Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the Web Worker inside an iframe? #51

Open
laughinghan opened this issue Jul 10, 2019 · 4 comments
Open

Why is the Web Worker inside an iframe? #51

laughinghan opened this issue Jul 10, 2019 · 4 comments

Comments

@laughinghan
Copy link

laughinghan commented Jul 10, 2019

Is there any documentation anywhere as to why the Web Worker is launched from inside an iframe, as opposed to just relying on the worker for isolation?

I understand defense-in-depth, but of course there's more to it than just "more layers", or else you'd have 3 or 10 nested iframes. Is there a specific reason to think someone could break out of a worker but run into trouble breaking out of the iframe? If anything frames seem easier to break out of than workers, what with its partial access to parent windows and heavily polluted, ever-growing global namespace.

@asvd
Copy link
Owner

asvd commented Jul 11, 2019

#1

although even iframes seem to be not secure enough

#33

so please conside jailed as broken atm

@willstott101
Copy link

Have you got a source or known exploit which makes this library unsafe for browser usage? Or is it only broken in node.js?

@Venryx
Copy link

Venryx commented Oct 1, 2020

@asvd Any update on @willstott101's question above?

I'm only aware of exploits described for the node.js version (#33), not the browser version. (would be good to have a confirmation from the repo owner on the browser-version's status)

EDIT: My guess is that @asvd was referring to this web issue: #43

However, if my analysis is correct, that's just due to the non-standard access-control-allow-origin header for the demo site, not an actual vulnerability in the approach jailed uses.

@spielzeugland
Copy link

One reson to do so, ist the fact that you cannot Set CSP Headers for Web Workers. They inherit the settings from the hosting page.
In Addition the iFrame must have an different origin (or a strict Sandbox config, which ist mit that easy).
These are General Statements without having looked at the concrete Implementation of jailed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants