by mwcampbell · 5y ago · 0 comments
> MS Teams ElectronJS security: remote-require is disabled & filtered, nodeIntegration is false, webview creation is filtered and normally removes insecure params/options. You cannot simply import child_process and execute arbitrary code or create a webview with a custom preload option.
it looks like they did everything right.
I would like this thread to go beyond outrage at how Microsoft handled this, or another excuse to bash Electron. What lessons can developers using Electron take from this? (No, "don't use Electron" doesn't count.)
Basically you got it completely backwards. The typical native app (which is not Rust or Java but C/C++/Obj-C, etc) only keeps the unsafe part of Electron, and even drops the sandbox (whose holes can always be patched, but total absense cannot).
It is very disingenuous to say that other native apps keep the unsafe parts; there are no such parts at all.
It should be telling that Microsoft, in one of their most successful products of late, have punched an RCE sized hole in that sandbox unwittingly.
E.g. we can drop Exchange for email for a safe alternative like Sendmail.
Why would it count? The situation would have more easily occured and be even worse with a C/C++ native app.
I think it will take a long time before we can call ElectronJS secure. there are regular sandbox escapes and that is from what we know publicly
“Can it escape the Chromium renderer sandbox? Or is that sandbox disabled?”
the real answer is more complicated as it is not necessarily a global setting and depends on what you call a “sandbox”