First published: Thu Dec 21 2017(Updated: )
The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by a Resolv::Hosts::new argument beginning with a '|' character, a different vulnerability than <a href="https://access.redhat.com/security/cve/CVE-2017-17405">CVE-2017-17405</a>. NOTE: situations with untrusted input may be highly unlikely. Upstream bug: <a href="https://github.com/ruby/ruby/pull/1777">https://github.com/ruby/ruby/pull/1777</a> Upstream patch: <a href="https://github.com/ruby/ruby/commit/e7464561b5151501beb356fc750d5dd1a88014f7">https://github.com/ruby/ruby/commit/e7464561b5151501beb356fc750d5dd1a88014f7</a>
Affected Software | Affected Version | How to fix |
---|---|---|
Ruby | <=2.4.3 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-1528218 is considered critical due to the potential for command injection attacks.
To fix REDHAT-BUG-1528218, upgrade Ruby to version 2.5 or later where this vulnerability has been addressed.
REDHAT-BUG-1528218 affects Ruby versions up to and including 2.4.3.
The nature of the attack associated with REDHAT-BUG-1528218 involves command injection through the use of Kernel#open in the lazy_initialize function.
A possible workaround for REDHAT-BUG-1528218 is to avoid the use of the Resolv::Hosts::new method with arguments starting with a '|' character.