CVE-2018-16395 in the critical feed json
Ruby Openssl Allows Incorrect Value Comparison
published 7y ago modified 4mo ago also GHSA-mmrq-6999-72v8 , EUVD-2022-4596
- cvss
- 9.8
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 10.7%
- EPSS 10.7% chance of exploitation in 30 days, percentile 95%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems openssl 2.0.9, 2.1.2
- ruby-lang openssl 2.1.2
- ruby2.0 Ubuntu 14.04 LTS 2.0.0.484-1ubuntu2.11
- ruby2.3 Ubuntu 16.04 LTS 2.3.1-2~16.04.11
- ruby2.5 Ubuntu 18.04 LTS 2.5.1-1ubuntu1.1
- ruby1.9.1 Ubuntu 14.04 LTS 1.9.3.484-2ubuntu1.13
ubuntu advisories UBUNTU-CVE-2018-16395
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rh-ruby23-ruby RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-69.el6
- rh-ruby23-ruby RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-69.el7
- rh-ruby23-ruby-irb RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-69.el6
- rh-ruby23-ruby-irb RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-69.el7
- rh-ruby23-rubygems RHEL 3 SOFTWARE_COLLECTIONS 2.5.2.3-69.el6
- rh-ruby23-rubygems RHEL 3 SOFTWARE_COLLECTIONS 2.5.2.3-69.el7
- rh-ruby23-ruby-libs RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-69.el6
- rh-ruby23-ruby-libs RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-69.el7
red hat advisories RHSA-2018:3729RHSA-2018:3730RHSA-2018:3731RHSA-2019:1948RHSA-2019:2565RHSA-2018:3738
- ruby WebYast 1.3 1.8.7.p357-0.9.20.3.1
- ruby2.1 SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +14 more 2.1.9-19.3.2
- yast2-ruby-bindings SLES for SAP 12 SP2, SLES 12 SP2-LTSS, SLES 12 SP2-BCL +1 more 3.1.53-9.8.1
- ruby2.5 SLE Module for Basesystem 15 SP1, SLE Module for Basesystem 15 2.5.5-4.3.1
suse advisories SUSE-SU-2022:15034-1SUSE-SU-2020:1570-1SUSE-SU-2019:1804-1
- ruby2.5 openSUSE Leap 15.1, openSUSE Leap 15.0 2.5.5-lp151.4.3.1
- ruby-bundled-gems-rpmhelper openSUSE Leap 15.1, openSUSE Leap 15.0 0.0.2-lp151.2.1
opensuse advisories openSUSE-SU-2019:1771-1
- ruby Alpine 3.24, Alpine 3.23, Alpine 3.22 +13 more 2.5.2-r0
- ruby Alpine 3.5, Alpine 3.4 2.3.8-r0
- ruby Alpine 3.7, Alpine 3.6 2.4.5-r0
alpine advisories ALPINE-CVE-2018-16395
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/ruby/openssl@f653cfa commit
- hackerone.com/reports/387250 advisory
Is CVE-2018-16395 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-16395 updated cvss 7.5
ruby: OpenSSL::X509:: Name equality check does not work correctly
-
Red Hat Enterprise Linux 5 ruby Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, ruby-libs, ruby-rdoc, ruby-tcltk Red Hat Subscription Asset Manager ruby193 Red Hat Virtualization 4 rubyaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux Client (v. 7) ruby 2.0.0.648-34.el7_6, rubygems 2.0.14.1-34.el7_6, ruby-irb 2.0.0.648-34.el7_6, rubygem-json 1.7.7-34.el7_6, rubygem-rdoc 4.0.0-34.el7_6, ruby-libs 2.0.0.648-34.el7_6, +3 more Red Hat Enterprise Linux Client Optional (v. 7) rubygem-rake 0.9.6-34.el7_6, ruby-tcltk 2.0.0.648-34.el7_6, rubygem-minitest 4.3.2-34.el7_6 Red Hat Enterprise Linux ComputeNode (v. 7) ruby 2.0.0.648-34.el7_6, rubygems 2.0.14.1-34.el7_6, ruby-irb 2.0.0.648-34.el7_6, rubygem-json 1.7.7-34.el7_6, rubygem-rdoc 4.0.0-34.el7_6, ruby-libs 2.0.0.648-34.el7_6, +3 morefixed: vendor fix RHSA-2018:3738
-
Red Hat Enterprise Linux ComputeNode EUS (v. 7.4) ruby 2.0.0.648-34.el7_4, rubygems 2.0.14.1-34.el7_4, ruby-irb 2.0.0.648-34.el7_4, rubygem-json 1.7.7-34.el7_4, rubygem-rdoc 4.0.0-34.el7_4, ruby-libs 2.0.0.648-34.el7_4, +3 morefixed: vendor fix RHSA-2019:1948
-
Red Hat Enterprise Linux ComputeNode EUS (v. 7.5) ruby 2.0.0.648-34.el7_5, rubygems 2.0.14.1-34.el7_5, ruby-irb 2.0.0.648-34.el7_5, rubygem-json 1.7.7-34.el7_5, rubygem-rdoc 4.0.0-34.el7_5, ruby-libs 2.0.0.648-34.el7_5, +3 morefixed: vendor fix RHSA-2019:2565
-
Red Hat Enterprise Linux ComputeNode Optional (v. 7) rubygem-rake 0.9.6-34.el7_6, ruby-tcltk 2.0.0.648-34.el7_6, rubygem-minitest 4.3.2-34.el7_6fixed: vendor fix RHSA-2018:3738
-
Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.4) rubygem-rake 0.9.6-34.el7_4, ruby-tcltk 2.0.0.648-34.el7_4, rubygem-minitest 4.3.2-34.el7_4fixed: vendor fix RHSA-2019:1948
-
Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.5) rubygem-rake 0.9.6-34.el7_5, ruby-tcltk 2.0.0.648-34.el7_5, rubygem-minitest 4.3.2-34.el7_5fixed: vendor fix RHSA-2019:2565
-
Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server (v. 7) ruby 2.0.0.648-34.el7_6, rubygems 2.0.14.1-34.el7_6, ruby-irb 2.0.0.648-34.el7_6, rubygem-json 1.7.7-34.el7_6, rubygem-rdoc 4.0.0-34.el7_6, ruby-libs 2.0.0.648-34.el7_6, +3 more Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server Optional (v. 7) rubygem-rake 0.9.6-34.el7_6, ruby-tcltk 2.0.0.648-34.el7_6, rubygem-minitest 4.3.2-34.el7_6 Red Hat Enterprise Linux Server (v. 7) ruby 2.0.0.648-34.el7_6, rubygems 2.0.14.1-34.el7_6, ruby-irb 2.0.0.648-34.el7_6, rubygem-json 1.7.7-34.el7_6, rubygem-rdoc 4.0.0-34.el7_6, ruby-libs 2.0.0.648-34.el7_6, +3 morefixed: vendor fix RHSA-2018:3738
show 8 moreshow fewer
-
Red Hat Enterprise Linux Server EUS (v. 7.4) ruby 2.0.0.648-34.el7_4, rubygems 2.0.14.1-34.el7_4, ruby-irb 2.0.0.648-34.el7_4, rubygem-json 1.7.7-34.el7_4, rubygem-rdoc 4.0.0-34.el7_4, ruby-libs 2.0.0.648-34.el7_4, +3 morefixed: vendor fix RHSA-2019:1948
-
Red Hat Enterprise Linux Server EUS (v. 7.5) ruby 2.0.0.648-34.el7_5, rubygems 2.0.14.1-34.el7_5, ruby-irb 2.0.0.648-34.el7_5, rubygem-json 1.7.7-34.el7_5, rubygem-rdoc 4.0.0-34.el7_5, ruby-libs 2.0.0.648-34.el7_5, +3 morefixed: vendor fix RHSA-2019:2565
-
Red Hat Enterprise Linux Server Optional (v. 7) rubygem-rake 0.9.6-34.el7_6, ruby-tcltk 2.0.0.648-34.el7_6, rubygem-minitest 4.3.2-34.el7_6fixed: vendor fix RHSA-2018:3738
-
Red Hat Enterprise Linux Server Optional EUS (v. 7.4) rubygem-rake 0.9.6-34.el7_4, ruby-tcltk 2.0.0.648-34.el7_4, rubygem-minitest 4.3.2-34.el7_4fixed: vendor fix RHSA-2019:1948
-
Red Hat Enterprise Linux Server Optional EUS (v. 7.5) rubygem-rake 0.9.6-34.el7_5, ruby-tcltk 2.0.0.648-34.el7_5, rubygem-minitest 4.3.2-34.el7_5fixed: vendor fix RHSA-2019:2565
-
Red Hat Enterprise Linux Workstation (v. 7) ruby 2.0.0.648-34.el7_6, rubygems 2.0.14.1-34.el7_6, ruby-irb 2.0.0.648-34.el7_6, rubygem-json 1.7.7-34.el7_6, rubygem-rdoc 4.0.0-34.el7_6, ruby-libs 2.0.0.648-34.el7_6, +3 more Red Hat Enterprise Linux Workstation Optional (v. 7) rubygem-rake 0.9.6-34.el7_6, ruby-tcltk 2.0.0.648-34.el7_6, rubygem-minitest 4.3.2-34.el7_6fixed: vendor fix RHSA-2018:3738
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-ruby23-ruby 2.3.8-69.el6, rh-ruby24-ruby 2.4.5-91.el6, rh-ruby23-ruby-irb 2.3.8-69.el6, rh-ruby24-ruby-irb 2.4.5-91.el6, rh-ruby23-ruby-libs 2.3.8-69.el6, rh-ruby24-ruby-libs 2.4.5-91.el6, +27 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby25-ruby 2.5.3-6.el7, rh-ruby23-ruby 2.3.8-69.el7, rh-ruby24-ruby 2.4.5-91.el7, rh-ruby25-ruby-irb 2.5.3-6.el7, rh-ruby25-rubygems 2.7.6-6.el7, rh-ruby23-ruby-irb 2.3.8-69.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-ruby25-ruby 2.5.3-6.el7, rh-ruby23-ruby 2.3.8-69.el7, rh-ruby24-ruby 2.4.5-91.el7, rh-ruby25-ruby-irb 2.5.3-6.el7, rh-ruby25-rubygems 2.7.6-6.el7, rh-ruby23-ruby-irb 2.3.8-69.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-ruby25-ruby 2.5.3-6.el7, rh-ruby23-ruby 2.3.8-69.el7, rh-ruby24-ruby 2.4.5-91.el7, rh-ruby25-ruby-irb 2.5.3-6.el7, rh-ruby25-rubygems 2.7.6-6.el7, rh-ruby23-ruby-irb 2.3.8-69.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-ruby25-ruby 2.5.3-6.el7, rh-ruby23-ruby 2.3.8-69.el7, rh-ruby24-ruby 2.4.5-91.el7, rh-ruby25-ruby-irb 2.5.3-6.el7, rh-ruby25-rubygems 2.7.6-6.el7, rh-ruby23-ruby-irb 2.3.8-69.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-ruby23-ruby 2.3.8-69.el6, rh-ruby24-ruby 2.4.5-91.el6, rh-ruby23-ruby-irb 2.3.8-69.el6, rh-ruby24-ruby-irb 2.4.5-91.el6, rh-ruby23-ruby-libs 2.3.8-69.el6, rh-ruby24-ruby-libs 2.4.5-91.el6, +27 morefixed: vendor fix RHSA-2018:3729
+1 more productsfewer
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby25-ruby 2.5.3-6.el7, rh-ruby23-ruby 2.3.8-69.el7, rh-ruby24-ruby 2.4.5-91.el7, rh-ruby25-ruby-irb 2.5.3-6.el7, rh-ruby25-rubygems 2.7.6-6.el7, rh-ruby23-ruby-irb 2.3.8-69.el7, +44 more -
Red Hat Enterprise Linux 8 ruby, ruby-irb, rubygems, ruby-libs, rubygem-pg, rubygem-irb, +25 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
10.72% chance of exploitation in the next 30 days, higher than 95% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | openssl | <2.0.9 >=2.1.0, <2.1.2 |
2.0.9 2.1.2 |
References
-
hackerone.com
/reports/387250
web, patch, third-party-advisory
-
github.com
/ruby/openssl/commit/f653cfa43f0f20e8c440122ea982382b6228e7f5
web
-
access.redhat.com
/errata/RHSA-2018:3738
vendor-advisory, web, third-party-advisory
-
access.redhat.com
/errata/RHSA-2018:3729
vendor-advisory, web, third-party-advisory
-
access.redhat.com
/errata/RHSA-2018:3730
vendor-advisory, web, third-party-advisory
-
access.redhat.com
/errata/RHSA-2018:3731
vendor-advisory, web, third-party-advisory
-
debian.org
/security/2018/dsa-4332
vendor-advisory, web, third-party-advisory
-
usn.ubuntu.com
/3808-1/
vendor-advisory, third-party-advisory
-
lists.opensuse.org
/opensuse-security-announce/2019-07/msg00036.html
vendor-advisory, web, mailing-list, third-party-advisory
-
access.redhat.com
/errata/RHSA-2019:1948
vendor-advisory, web, third-party-advisory
-
access.redhat.com
/errata/RHSA-2019:2565
vendor-advisory, web
-
ruby-lang.org
/en/news/2018/10/17/openssl-x509-name-equality-check-does-not-work-correctly-cve-2018-16395/
mitigation, vendor-advisory
-
ruby-lang.org
/en/news/2018/11/06/ruby-2-6-0-preview3-released/
release-notes, vendor-advisory
-
ruby-lang.org
/en/news/2018/10/17/ruby-2-3-8-released/
release-notes, vendor-advisory
-
ruby-lang.org
/en/news/2018/10/17/ruby-2-4-5-released/
release-notes, vendor-advisory
-
ruby-lang.org
/en/news/2018/10/17/ruby-2-5-2-released/
release-notes, vendor-advisory
-
security.netapp.com
/advisory/ntap-20190221-0002/
third-party-advisory
-
lists.debian.org
/debian-lts-announce/2018/10/msg00020.html
mailing-list, web, third-party-advisory
-
securitytracker.com
/id/1042105
vdb-entry, third-party-advisory
-
oracle.com
/security-alerts/cpujan2020.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2018-16395
advisory
-
ruby-lang.org
/en/news/2018/11/06/ruby-2-6-0-preview3-released
web
-
ruby-lang.org
/en/news/2018/10/17/ruby-2-5-2-released
web
-
ruby-lang.org
/en/news/2018/10/17/ruby-2-4-5-released
web
-
ruby-lang.org
/en/news/2018/10/17/ruby-2-3-8-released
web
-
ruby-lang.org
/en/news/2018/10/17/openssl-x509-name-equality-check-does-not-work-correctly-cve-2018-16395
web
-
web.archive.org
/web/20211206015239/https://securitytracker.com/id/1042105
web
-
usn.ubuntu.com
/3808-1
web
-
security.netapp.com
/advisory/ntap-20190221-0002
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/openssl/CVE-2018-16395.yml
web
Sources
- CVE List CVE-2018-16395
- GitHub Advisory GHSA-mmrq-6999-72v8
- NVD CVE-2018-16395
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.