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: validate ip address before executing command for 'find' #16

Merged
merged 2 commits into from
Oct 24, 2019

Conversation

DylanPiercey
Copy link
Owner

Currently it is possible for an attacker to execute an arbitrary command on a host system by using the find api since the argument provided is passed directly into a command string.

eg:

var userInput = '127.0.0.1 | mkdir attacker';
find(userInput);

This PR fixes this potential security issue by first validating the IP address for the find api.

//cc @natterstefan

Copy link
Collaborator

@natterstefan natterstefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top, thank you!

@DylanPiercey
Copy link
Owner Author

@natterstefan do you think it's fair to release this as a patch?

@natterstefan
Copy link
Collaborator

natterstefan commented Jul 8, 2019

@DylanPiercey Yes, it's fair. But considering what's also waiting in master, I suggest we release a new feature version (we briefly talked about it already), don't you think? We must also update CHANGES.md, missed that in the previous PRs: https://d.pr/i/CJTWPm/Fr4qiTTkBY.

@natterstefan natterstefan merged commit 57b9a93 into master Oct 24, 2019
@natterstefan natterstefan deleted the validate-ip branch October 24, 2019 17:58
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.

2 participants