All reports
Low

ruby: Command injection in lib/resolv.rb:lazy_initialize() allows arbitrary code execution

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2017-17790

Probability of exploitation in the next 30 days: 5.91%

FIRST EPSS · 2026-11-22

Description

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 CVE-2017-17405. NOTE: situations with untrusted input may be highly unlikely.

The "lazy_initialize" function in lib/resolv.rb did not properly process certain filenames. A remote attacker could possibly exploit this flaw to inject and execute arbitrary commands.