Loading...
Skip to main content

CVE-2018-16395 — Vulnerability in openssl — CVE Details

CRITICAL

Ruby Openssl Allows Incorrect Value Comparison

Published May 13, 2022Updated December 3, 2024Source: osv

Summary

An issue was discovered in the OpenSSL library in Ruby 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.

Advisory Timeline

  • First published May 13, 2022 (1613 days ago).
  • Last revised December 3, 2024 — 935 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update openssl to 2.1.2 or later
gem install openssl -v 2.1.2
Bundler
Update openssl to 2.0.9 or later
gem install openssl -v 2.0.9

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
openssl
rubygems
2.1.0, 2.1.12.1.2
openssl
rubygems
2.0.0, 2.0.0.beta.1, 2.0.0.beta.2, 2.0.1 (+7 more)2.0.9

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2018-16395?
Ruby Openssl Allows Incorrect Value Comparison This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2018-16395?
CVE-2018-16395 affects openssl. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2018-16395 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-mmrq-6999-72v8

Related CVEs

  • CVE-2026-55107
    CRITICAL

    kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

  • CVE-2026-77602
    CRITICAL

    OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)

  • CVE-2016-7798
    HIGH

    OpenSSL gem for Ruby using inadequate encryption strength

  • CVE-2017-14033
    HIGH

    Ruby OpenSSL DoS Vulnerability

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies