devbook-palette icon indicating copy to clipboard operation
devbook-palette copied to clipboard

RCE/XSS vulnerability with Mozilla 'interactive-examples' iFrames.

Open David-Stephenson opened this issue 4 years ago • 1 comments

Hello, I was able to execute code that would interact with the electron instance via the Mozilla interactive examples iFrames. You can watch an example of this vulnerability on YouTube. This is a common vulnerability involved with Electrons "nodeIntegration" property being set to true. You can read more about the vulnerability on Doyensec's Blog.

How to reproduce

The Mozilla interactive examples run inside an iFrame and allows you to modify and execute JavaScript. I was able to execute code inside the iFrame that would set the parent page of iFrame to a website of my choice. On the website of my choice I wrote JavaScript that would interact with the NodeJS process and execute programs require('child_process').exec().

Possible ways to fix the vulnerability.

  1. Try running iFrames with the sandbox attribute

David-Stephenson avatar Aug 10 '21 02:08 David-Stephenson

yes, It's a CVE bug. I have also successfully reproduced it.

xadhrit avatar Aug 11 '21 12:08 xadhrit