CVE-2017-17790: 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...
Critical CVSS 9.8
- CVE id
- CVE-2017-17790
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Ruby Runtimes and servers |
>= 2.2, <= 2.2.8 >= 2.3, <= 2.3.5 >= 2.4, <= 2.4.2 |
after 2.2.8, 2.3.5, 2.4.2 |
How to fix it
Upgrade Ruby to a release newer than the last affected update of the line you run (2.2.8, 2.3.5, 2.4.2).
ruby --version
- Install the patched Ruby release of your minor line (rbenv, the ruby image tag) and update .ruby-version.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2017-17790 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2017-17790
- Web: https://access.redhat.com/errata/RHSA-2018:0378
- Web: https://access.redhat.com/errata/RHSA-2018:0583
- Web: https://access.redhat.com/errata/RHSA-2018:0584
- Web: https://access.redhat.com/errata/RHSA-2018:0585
- Web: https://github.com/ruby/ruby/pull/1777
- Web: https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html
- Web: https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html
- Web: https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- Web: https://www.debian.org/security/2018/dsa-4259
- Web: https://access.redhat.com/errata/RHSA-2018:0378
- Web: https://access.redhat.com/errata/RHSA-2018:0583
- Web: https://access.redhat.com/errata/RHSA-2018:0584
- Web: https://access.redhat.com/errata/RHSA-2018:0585
- Web: https://github.com/ruby/ruby/pull/1777
- Web: https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html
- Web: https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html
- Web: https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- Web: https://www.debian.org/security/2018/dsa-4259
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.