This repository has been archived by the owner on Jun 27, 2021. It is now read-only.
Improper Electron Security Practices #143
Labels
category: core
Something to do with loading plugins or pre-included features
help wanted
If you have the time, pitch in and make a pull request. Otherwise it'll take a long time for this.
priority: low
Not as important compared to other issues or enhancements.
status: delayed
Don't have the time/resources to implement now. will be worked on, but not in the near future.
type: tweak
A suggestion to edit something that is neither a bug nor a feature request
Upon reviewing this project's "injector" code, it appears it disables numerous security features implemented by Discord to ensure remote code is sufficiently sandboxed from the operating system. As it stands, this software is a walking remote code execution waiting to happen.
This software leaks node integration into the main window. This means the window has access to directly modify the file system and execute arbitrary commands.
This software enables Electron's remote module in the main window. This means the window has access to send direct IPC commands which can be used to execute arbitrary code. The remote module is also being removed in the next version of Electron, so you will have to fix this anyways when that occurs.
This software disables Electron's context isolation, which forces browser code to run in a separate context from main window code. This prevents attackers from doing things like polluting prototypes which may expose access to restricted functions that escalate access to execute arbitrary commands.
CSP exists to mitigate and prevent attacks around most XSS and content injection. If someone finds XSS in Discord, the lack of 1, 2, and 3 listed above would directly result in remote code execution.
Security of Electron is not to be taken lightly as there are many foot-guns. By releasing software like this and encouraging people to install it, you are putting users at risk without taking proper steps to keep Electron secure. I would strongly encourage you to read up on the best security practices for Electron at https://www.electronjs.org/docs/tutorial/security and apply those to this project.
The text was updated successfully, but these errors were encountered: