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

Vulnerable to arbitrary command execution #10

Open
cdown opened this issue Jan 6, 2015 · 3 comments
Open

Vulnerable to arbitrary command execution #10

cdown opened this issue Jan 6, 2015 · 3 comments

Comments

@cdown
Copy link

cdown commented Jan 6, 2015

Hi,

Just to let you know, your use of system() is vulnerable to arbitrary command execution (this situation is especially bad since it can be invoked by anyone over IRC). Filtering characters is not enough. Don't use system(), use a real subprocess spawner that doesn't involve using a shell.

@cdown
Copy link
Author

cdown commented Jan 7, 2015

Specifically, because $title is not sanitised and $topic can be arbitrary.

@Someguy123
Copy link

I was just about to install this script until I saw this issue. Thank's for posting this. This issue is terrifying and really needs to be fixed.

@ghost
Copy link

ghost commented Jan 6, 2017

I just remembered I wrote this awhile back, ended up throwing generic libnotify support for a friend as well since I pretty much don't use macOS anymore.

I use fork() exec() so it shouldn't be vulnerable to this same problem as I'm not executing a shell.
It should also be a hell of a lot faster, If you get bombarded with like 20 messages at once, since it does fork(); useful if you use a BNC.

https://github.com/GeneralUnRest/irssi-mac-notify

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

No branches or pull requests

2 participants