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

Fix Arbitary Code Execution using execFile and spawn #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alromh87
Copy link

@alromh87 alromh87 commented Sep 26, 2020

openjtalk is vulnerable to Command Injection. It is possible to inject arbitrary commands by using a semicolon char in any of the key values, using the talk() fucntion.

Comand use pipe to comunicate betwen process, this was replaced with spawn to link stout to stdin.

🐛 Proof of Concept (PoC) *

  1. Install the package
  2. Check there aren't files called HACKED
  3. Execute the following js script:
var OpenJTalk = require('openjtalk');
var mei = new OpenJTalk();
mei.talk(' "; touch HACKED; #//');
  1. It will create a file HACKED in the working directory.

After fix no HACKED file is created

Commands can be executed normally, and audio fles are correctly erased

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 this pull request may close these issues.

1 participant