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

Potential Command Execution vulnerabilities introduced by main-preload.js #856

Closed
xiaofen9 opened this issue Mar 9, 2021 · 2 comments
Closed
Assignees
Labels
assigned to core 🦹 Issues are taken care of by the core team actively security issue 🔑 Issue concerns Boostnote's security. Usually high priority.

Comments

@xiaofen9
Copy link

xiaofen9 commented Mar 9, 2021

Hi,

We found that static/main-preload.js introduces dangerous API openShellExternal for arbitrary access on unsafe renderer process.
This may lead to remote command execution.
We suggest that a URL check should be enforced at L15, which enforces an allowlist on trusted URLs.

https://github.com/BoostIO/BoostNote.next/blob/a467dcb960531953040f26d09bd59a90c37a002e/static/main-preload.js#L14-L17

@Rokt33r Rokt33r added the security issue 🔑 Issue concerns Boostnote's security. Usually high priority. label Aug 20, 2021
@Rokt33r
Copy link
Member

Rokt33r commented Aug 20, 2021

Thanks for reporting. For now, it is okay since we're using the method with safe URLs only. So it won't cause any problems unless a user executing an arbitrary script from dev tools. But I'll make it safer for the case that someone makes a mistake.

@Komediruzecki This could be problematic for the local app since links in the markdown previewer are using this method without any URL filtering.

@Rokt33r Rokt33r self-assigned this Aug 20, 2021
@Rokt33r Rokt33r added the assigned to core 🦹 Issues are taken care of by the core team actively label Aug 23, 2021
@xiaofen9
Copy link
Author

xiaofen9 commented Jun 4, 2022

Fixed by BoostIO/BoostNote.next-local#39

@xiaofen9 xiaofen9 closed this as completed Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned to core 🦹 Issues are taken care of by the core team actively security issue 🔑 Issue concerns Boostnote's security. Usually high priority.
Projects
None yet
Development

No branches or pull requests

2 participants