---
title: "CVE-2018-16395\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2018-16395?format=md
keywords: index, follow
---

# CVE-2018-16395

Publication date 26 October 2018

Last updated 11 February 2026

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**9.8 · Critical**

[Score breakdown](https://ubuntu.com/security/CVE-2018-16395?format=md#impact-score)

Toggle side navigation

## 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.

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| ruby-openssl | 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not affected |
| 19.04 disco | Not affected |
| 18.10 cosmic | Ignored end of life |
| 18.04 LTS bionic | Not affected |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |
| ruby1.9.1 | 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not in release |
| 19.04 disco | Not in release |
| 18.10 cosmic | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Fixed 1.9.3.484-2ubuntu1.13 |
| ruby2.0 | 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not in release |
| 19.04 disco | Not in release |
| 18.10 cosmic | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Fixed 2.0.0.484-1ubuntu2.11 |
| ruby2.3 | 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Not in release |
| 19.04 disco | Not in release |
| 18.10 cosmic | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Fixed 2.3.1-2~16.04.11 |
| 14.04 LTS trusty | Not in release |
| ruby2.5 | 25.10 questing | Not in release |
| 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 21.04 hirsute | Not in release |
| 20.10 groovy | Not in release |
| 20.04 LTS focal | Not in release |
| 19.10 eoan | Fixed 2.5.1-6ubuntu3 |
| 19.04 disco | Fixed 2.5.1-6ubuntu3 |
| 18.10 cosmic | Fixed 2.5.1-5ubuntu4.1 |
| 18.04 LTS bionic | Fixed 2.5.1-1ubuntu1.1 |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2018-16395?format=md#patch-details)

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| ruby-openssl | * Upstream:   [f653cfa](https://github.com/ruby/openssl/commit/f653cfa43f0f20e8c440122ea982382b6228e7f5) |
| ruby2.0 | * Upstream:   [f653cfa](https://github.com/ruby/openssl/commit/f653cfa43f0f20e8c440122ea982382b6228e7f5) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

9.8 · Critical

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 9.8 · Critical |
  | Exploitability score | - |
  | Impact score | - |

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

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16395)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2018-16395)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2018-16395)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2018-16395)

### Related Ubuntu Security Notices (USN)

+ [USN-3808-1](https://usn.ubuntu.com/USN-3808-1)
+ Ruby vulnerabilities
+ 5 November 2018

### Other references

* <https://www.ruby-lang.org/en/news/2018/10/17/openssl-x509-name-equality-check-does-not-work-correctly-cve-2018-16395/>
* <https://www.cve.org/CVERecord?id=CVE-2018-16395>
