KEMBAR78
Fixed command Injection by ret2jazzy · Pull Request #1777 · ruby/ruby · GitHub
Skip to content

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants