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 preload.js #13

Closed
xiaofen9 opened this issue Mar 9, 2021 · 1 comment · Fixed by #14
Closed

Potential Command Execution vulnerabilities introduced by preload.js #13

xiaofen9 opened this issue Mar 9, 2021 · 1 comment · Fixed by #14

Comments

@xiaofen9
Copy link

xiaofen9 commented Mar 9, 2021

Hi,

We found that 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.

clipper/preload.js

Lines 14 to 16 in d133fde

window.openExternalUrl = (url) => {
remote.shell.openExternal(url);
};

@AkashRajpurohit
Copy link
Owner

Makes sense. A validUrl function which check against a list of urls can be a solution. If you are interested to add this, PRs are welcomed for it. I'll look into it. Thank you 😄

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

Successfully merging a pull request may close this issue.

2 participants