Vulnerabilities / CVE-2018-16395

critical

CVE-2018-16395

ruby: OpenSSL::X509:: Name equality check does not work correctly

Published Modified
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat7.5CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, CBL-Mariner, Photon OS, Ruby Advisory DB. Rated lower by Red Hat (high), Amazon (high), Oracle (high), Ubuntu (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
CBL-Mariner 1.0openssl0:1.1.1k-5.cm1
Photon OS 1.0ruby2.5.3-1.ph1
Photon OS 2.0ruby2.5.3-1.ph2
Photon OS 3.0ruby2.5.3-1.ph3
rubygems::GitHub Security Advisory RubyGemsopenssl2.0.9, 2.1.2
rubygems::Ruby Advisory Databaseopenssl>= 2.1.2
alpine 3.11ruby2.5.2-r0
alpine 3.12ruby2.5.2-r0
alpine 3.13ruby2.5.2-r0
alpine 3.14ruby2.5.2-r0
alpine 3.15ruby2.5.2-r0
alpine 3.16ruby2.5.2-r0
Show all 105 entries from 41 sources
SourcePackageFixed in
CBL-Mariner 1.0openssl0:1.1.1k-5.cm1
Photon OS 1.0ruby2.5.3-1.ph1
Photon OS 2.0ruby2.5.3-1.ph2
Photon OS 3.0ruby2.5.3-1.ph3
rubygems::GitHub Security Advisory RubyGemsopenssl2.0.9, 2.1.2
rubygems::Ruby Advisory Databaseopenssl>= 2.1.2
alpine 3.11ruby2.5.2-r0
alpine 3.12ruby2.5.2-r0
alpine 3.13ruby2.5.2-r0
alpine 3.14ruby2.5.2-r0
alpine 3.15ruby2.5.2-r0
alpine 3.16ruby2.5.2-r0
alpine 3.17ruby2.5.2-r0
alpine 3.18ruby2.5.2-r0
alpine 3.19ruby2.5.2-r0
alpine 3.20ruby2.5.2-r0
alpine 3.21ruby2.5.2-r0
alpine 3.22ruby2.5.2-r0
alpine 3.23ruby2.5.2-r0
alpine 3.24ruby2.5.2-r0
alpine 3.4ruby2.3.8-r0
alpine 3.5ruby2.3.8-r0
alpine 3.6ruby2.4.5-r0
alpine 3.7ruby2.4.5-r0
alpine 3.8ruby2.5.2-r0
alpine 3.9ruby2.5.2-r0
alpine edgeruby2.5.2-r0
amazon linux 1ruby232.3.8-1.20.amzn1
amazon linux 1ruby23-debuginfo2.3.8-1.20.amzn1
amazon linux 1ruby23-devel2.3.8-1.20.amzn1
amazon linux 1ruby23-doc2.3.8-1.20.amzn1
amazon linux 1ruby23-irb2.3.8-1.20.amzn1
amazon linux 1ruby23-libs2.3.8-1.20.amzn1
amazon linux 1ruby242.4.5-1.30.7.amzn1
amazon linux 1ruby24-debuginfo2.4.5-1.30.7.amzn1
amazon linux 1ruby24-devel2.4.5-1.30.7.amzn1
amazon linux 1ruby24-doc2.4.5-1.30.7.amzn1
amazon linux 1ruby24-irb2.4.5-1.30.7.amzn1
amazon linux 1ruby24-libs2.4.5-1.30.7.amzn1
amazon linux 1rubygem23-bigdecimal1.2.8-1.20.amzn1
amazon linux 1rubygem23-did_you_mean1.0.0-1.20.amzn1
amazon linux 1rubygem23-io-console0.4.5-1.20.amzn1
amazon linux 1rubygem23-json1.8.3.1-1.20.amzn1
amazon linux 1rubygem23-psych2.1.0.1-1.20.amzn1
amazon linux 1rubygem24-bigdecimal1.3.2-1.30.7.amzn1
amazon linux 1rubygem24-did_you_mean1.1.0-1.30.7.amzn1
amazon linux 1rubygem24-io-console0.4.6-1.30.7.amzn1
amazon linux 1rubygem24-json2.0.4-1.30.7.amzn1
amazon linux 1rubygem24-psych2.2.2-1.30.7.amzn1
amazon linux 1rubygem24-xmlrpc0.2.1-1.30.7.amzn1
amazon linux 1rubygems232.5.2.3-1.20.amzn1
amazon linux 1rubygems23-devel2.5.2.3-1.20.amzn1
amazon linux 1rubygems242.6.14.3-1.30.7.amzn1
amazon linux 1rubygems24-devel2.6.14.3-1.30.7.amzn1
amazon linux 2ruby2.0.0.648-34.amzn2.0.1
amazon linux 2ruby-debuginfo2.0.0.648-34.amzn2.0.1
amazon linux 2ruby-devel2.0.0.648-34.amzn2.0.1
amazon linux 2ruby-doc2.0.0.648-34.amzn2.0.1
amazon linux 2ruby-irb2.0.0.648-34.amzn2.0.1
amazon linux 2ruby-libs2.0.0.648-34.amzn2.0.1
amazon linux 2ruby-tcltk2.0.0.648-34.amzn2.0.1
amazon linux 2rubygem-bigdecimal1.2.0-34.amzn2.0.1
amazon linux 2rubygem-io-console0.4.2-34.amzn2.0.1
amazon linux 2rubygem-json1.7.7-34.amzn2.0.1
amazon linux 2rubygem-minitest4.3.2-34.amzn2.0.1
amazon linux 2rubygem-psych2.0.0-34.amzn2.0.1
amazon linux 2rubygem-rake0.9.6-34.amzn2.0.1
amazon linux 2rubygem-rdoc4.0.0-34.amzn2.0.1
amazon linux 2rubygems2.0.14.1-34.amzn2.0.1
amazon linux 2rubygems-devel2.0.14.1-34.amzn2.0.1
debian 8ruby2.12.1.5-2+deb8u6
debian 9ruby2.32.3.3-1+deb9u4
Oracle Linux 7ruby2.0.0.648-34.el7_6
Oracle Linux 7ruby-devel2.0.0.648-34.el7_6
Oracle Linux 7ruby-doc2.0.0.648-34.el7_6
Oracle Linux 7ruby-irb2.0.0.648-34.el7_6
Oracle Linux 7ruby-libs2.0.0.648-34.el7_6
Oracle Linux 7ruby-tcltk2.0.0.648-34.el7_6
Oracle Linux 7rubygem-bigdecimal1.2.0-34.el7_6
Oracle Linux 7rubygem-io-console0.4.2-34.el7_6
Oracle Linux 7rubygem-json1.7.7-34.el7_6
Oracle Linux 7rubygem-minitest4.3.2-34.el7_6
Oracle Linux 7rubygem-psych2.0.0-34.el7_6
Oracle Linux 7rubygem-rake0.9.6-34.el7_6
Oracle Linux 7rubygem-rdoc4.0.0-34.el7_6
Oracle Linux 7rubygems2.0.14.1-34.el7_6
Oracle Linux 7rubygems-devel2.0.14.1-34.el7_6
Red Hatrubyno fix listed
Red Hatruby-develno fix listed
Red Hatruby-docsno fix listed
Red Hatruby-irbno fix listed
Red Hatruby-libsno fix listed
Red Hatruby-rdocno fix listed
Red Hatruby-rino fix listed
Red Hatruby-staticno fix listed
Red Hatruby-tcltkno fix listed
ubuntu 14.04ruby1.9.11.9.3.484-2ubuntu1.13
ubuntu 14.04ruby2.02.0.0.484-1ubuntu2.11
ubuntu 16.04ruby2.32.3.1-2~16.04.11
ubuntu 16.04-ESMruby2.32.3.1-2~16.04.11
ubuntu 18.04ruby2.52.5.1-1ubuntu1.1
ubuntu 18.04-ESMruby2.52.5.1-1ubuntu1.1
ubuntu 18.10ruby2.52.5.1-5ubuntu4.1
ubuntu 19.04ruby2.52.5.1-6ubuntu3
ubuntu 19.10ruby2.52.5.1-6ubuntu3

References

All 36 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.