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

Fixed command Injection #1777

Closed
wants to merge 1 commit into from
Closed

Conversation

ret2jazzy
Copy link

Command Injection in Hosts::new() by use of Kernel#open

Command Injection in Hosts::new() by use of Kernel#open
@ret2jazzy
Copy link
Author

Here is the PoC of command injection

require 'resolv'
a = Resolv::Hosts::new("|echo 1 > /tmp/rce")
a.getaddress("lol")

@nobu
Copy link
Member

nobu commented Dec 19, 2017

What situation is that an external input is fed to Resolv::Hosts?

@ret2jazzy
Copy link
Author

Well actually kinda never. That is why I made a pr instead of reporting it to the security email.

@matzbot matzbot closed this in e746456 Dec 20, 2017
@philCryoport
Copy link

philCryoport commented Jan 29, 2018

@matzbot

There is a CVE with a score of 7.5 against this: https://www.cvedetails.com/cve/CVE-2017-17790/

I don't see a code merge entry for this pull request. Has this CVE been resolved through a separate channel? If so please document by linking to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants