CVE-2018-16395
Ruby Openssl Allows Incorrect Value Comparison
Reported by mitre · Published November 16, 2018
openssl is fixed in 2.1.2 (RubyGems)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| openssl | RubyGems | 2.1.2 |
| ruby-irb | Amazon Linux | 2.0.0.648-34.amzn2.0.1 |
| rubygem-io-console | Amazon Linux | 0.4.2-34.amzn2.0.1 |
| rubygem-rdoc | Amazon Linux | 4.0.0-34.amzn2.0.1 |
| ruby-devel | Amazon Linux | 2.0.0.648-34.amzn2.0.1 |
| rubygem-bigdecimal | Amazon Linux | 1.2.0-34.amzn2.0.1 |
| rubygem-rake | Amazon Linux | 0.9.6-34.amzn2.0.1 |
| ruby-libs | Amazon Linux | 2.0.0.648-34.amzn2.0.1 |
| ruby-tcltk | Amazon Linux | 2.0.0.648-34.amzn2.0.1 |
| ruby-doc | Amazon Linux | 2.0.0.648-34.amzn2.0.1 |
| ruby2.5 | Ubuntu:18.04:LTS | 2.5.1-1ubuntu1.1 |
| openssl | ruby-lang | 2.1.2 |
2 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2 | ruby-irb | 0 |
| amazon:2 | rubygem-io-console | 0 |
| amazon:2 | rubygem-rdoc | 0 |
| amazon:2 | ruby-devel | 0 |
| amazon:2 | rubygem-bigdecimal | 0 |
| amazon:2 | rubygem-rake | 0 |
| amazon:2 | ruby-libs | 0 |
| amazon:2 | ruby-tcltk | 0 |
| amazon:2 | ruby-doc | 0 |
| n/a | n/a | * |
| amazon:2 | ruby | 0 |
| amazon:2 | rubygem-json | 0 |
| amazon:2 | rubygems | 0 |
| RubyGems | openssl | 0 |
| amazon:2 | rubygems-devel | 0 |
| amazon:2 | rubygem-psych | 0 |
| alpine | ruby | 0, 0, 0 |
| amazon:2 | rubygem-minitest | 0 |
Timeline
- Oct 19, 2018 PoC Published
- Nov 16, 2018 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Mar 6, 2026 Distribution Patch (8 in total, the first dated here)
- Mar 6, 2026 Security Advisory (11 in total, the first dated here)
- Sep 23, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-16395
vulnetix vdb fixes CVE-2018-16395
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-16395/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- RHSA-2018:3738 vendor-advisoryx_refsource_REDHAT
- x_refsource_CONFIRM
- RHSA-2018:3729 vendor-advisoryx_refsource_REDHAT
- x_refsource_MISC
- RHSA-2018:3730 vendor-advisoryx_refsource_REDHAT
- RHSA-2018:3731 vendor-advisoryx_refsource_REDHAT
- x_refsource_CONFIRM
- DSA-4332 vendor-advisoryx_refsource_DEBIAN
- USN-3808-1 vendor-advisoryx_refsource_UBUNTU
- x_refsource_CONFIRM
- x_refsource_CONFIRM
- x_refsource_CONFIRM
- [debian-lts-announce] 20181028 [SECURITY] [DLA 1558-1] ruby2.1 security update mailing-listx_refsource_MLIST
- 1042105 vdb-entryx_refsource_SECTRACK
- openSUSE-SU-2019:1771 vendor-advisoryx_refsource_SUSE
- RHSA-2019:1948 vendor-advisoryx_refsource_REDHAT
- RHSA-2019:2565 vendor-advisoryx_refsource_REDHAT
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2018-16395 advisory