CVE-2018-16395
An issue was discovered in the OpenSSL library in Ruby before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.2, and 2.6.x before 2.6.0-preview3. When two OpenSSL::X509::Name objects are compared using ==, depending on the ordering, non-equal objects may return true. When the first argument is one character longer than the second, or the second argument contains a character that is one less than a character in the same position of the first argument, the result of == will be true. This could be leveraged to create an illegitimate certificate that may be accepted as legitimate and then used in signing or encryption operations.
What to do
Likely to be exploited: EPSS gives a 11% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Red Hat, RubyGems, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 18.04 | ruby-openssl | Fix pending | ||
| Ubuntu 18.04 | ruby2.5 | Fixed | 2.5.1-1ubuntu1.1 | UBUNTU-CVE-2018-16395 |
| Ubuntu 16.04 | ruby2.3 | Fixed | 2.3.1-2~16.04.11 | UBUNTU-CVE-2018-16395 |
| Ubuntu 14.04 | ruby1.9.1 | Fixed | 1.9.3.484-2ubuntu1.13 | UBUNTU-CVE-2018-16395 |
| Ubuntu 14.04 | ruby2.0 | Fixed | 2.0.0.484-1ubuntu2.11 | UBUNTU-CVE-2018-16395 |
| Red Hat Enterprise Linux 8 | ruby | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-bundled-gems | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-default-gems | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-irb | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-abrt | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-abrt-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bigdecimal | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bson | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bson-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bundler | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bundler-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-did_you_mean | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-io-console | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-irb | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-json | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-minitest | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mongo | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mongo-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mysql2 | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mysql2-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-net-telnet | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-openssl | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-pg | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-pg-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-power_assert | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-psych | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-racc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rake | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rbs | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rdoc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rexml | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rss | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-test-unit | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-typeprof | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-xmlrpc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygems | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygems-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | ruby | Fixed | 0:2.0.0.648-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | ruby-devel | Fixed | 0:2.0.0.648-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | ruby-doc | Fixed | 0:2.0.0.648-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | ruby-irb | Fixed | 0:2.0.0.648-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | ruby-libs | Fixed | 0:2.0.0.648-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | ruby-tcltk | Fixed | 0:2.0.0.648-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-bigdecimal | Fixed | 0:1.2.0-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-io-console | Fixed | 0:0.4.2-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-json | Fixed | 0:1.7.7-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-minitest | Fixed | 0:4.3.2-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-psych | Fixed | 0:2.0.0-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-rake | Fixed | 0:0.9.6-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygem-rdoc | Fixed | 0:4.0.0-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygems | Fixed | 0:2.0.14.1-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 7 | rubygems-devel | Fixed | 0:2.0.14.1-34.el7_6 | RHSA-2018:3738 |
| Red Hat Enterprise Linux 6 | ruby | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-docs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-irb | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-libs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-rdoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-ri | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-static | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | ruby-tcltk | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | ruby | Will not fix Will not fix | ||
| Alpine Linux 3.24 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.23 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.22 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.21 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.20 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.19 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.18 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.17 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.16 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.15 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.14 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.13 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.12 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.11 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.9 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.8 | ruby | Fixed | 2.5.2-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.7 | ruby | Fixed | 2.4.5-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.6 | ruby | Fixed | 2.4.5-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.5 | ruby | Fixed | 2.3.8-r0 | ALPINE-CVE-2018-16395 |
| Alpine Linux 3.4 | ruby | Fixed | 2.3.8-r0 | ALPINE-CVE-2018-16395 |
| RubyGems library | openssl | Fixed | 2.0.9 | GHSA-mmrq-6999-72v8 |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2018:3738 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2018:3729 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2018:3730 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2018:3731 (vendor-advisory)
- https://www.debian.org/security/2018/dsa-4332 (vendor-advisory)
- https://usn.ubuntu.com/3808-1/ (vendor-advisory)
References
- https://www.ruby-lang.org/en/news/2018/10/17/openssl-x509-name-equality-check-does-not-work-correctly-cve-2018-16395/
- https://access.redhat.com/errata/RHSA-2018:3738
- https://www.ruby-lang.org/en/news/2018/11/06/ruby-2-6-0-preview3-released/
- https://access.redhat.com/errata/RHSA-2018:3729
- https://hackerone.com/reports/387250
- https://access.redhat.com/errata/RHSA-2018:3730
- https://access.redhat.com/errata/RHSA-2018:3731
- https://www.ruby-lang.org/en/news/2018/10/17/ruby-2-3-8-released/
- https://www.debian.org/security/2018/dsa-4332
- https://usn.ubuntu.com/3808-1/
- https://www.ruby-lang.org/en/news/2018/10/17/ruby-2-4-5-released/
- https://security.netapp.com/advisory/ntap-20190221-0002/
- https://www.ruby-lang.org/en/news/2018/10/17/ruby-2-5-2-released/
- https://lists.debian.org/debian-lts-announce/2018/10/msg00020.html
- http://www.securitytracker.com/id/1042105
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.