CVE-2015-1855
Ruby vulnerability analysis and mitigation

Overview

CVE-2015-1855 is a vulnerability discovered in Ruby's OpenSSL extension that affects the hostname verification process. The vulnerability exists in Ruby versions before 2.0.0 patchlevel 645, 2.1.x before 2.1.6, and 2.2.x before 2.2.2. The issue stems from improper validation of hostnames in violation of RFC 6125, which could allow remote attackers to perform man-in-the-middle attacks using crafted SSL certificates (Ruby Advisory, Debian Advisory).

Technical details

The vulnerability exists in the verify_certificate_identity function in the OpenSSL extension. The implementation performed a global substitution of '*' with '.+', which incorrectly allowed wildcards anywhere in the hostname and permitted multiple wildcards. This behavior violated RFC 2818 and RFC 6125 specifications, which only allow wildcards in the leftmost part of the hostname. The vulnerability has a CVSS v3.1 Base Score of 5.9 (Medium) with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N (NVD).

Impact

The vulnerability could allow remote attackers to perform man-in-the-middle attacks using crafted SSL certificates. For example, a certificate for 'www..foo.' could be successfully verified against 'www.bar.foo.org' or 'www.foobar.foo.bar', which should not be allowed according to security standards. This overly permissive matching affects various protocols including HTTP, SMTP, IMAP, and POP (Ruby Bug).

Mitigation and workarounds

Users should upgrade to Ruby versions 2.0.0 patchlevel 645 or later, Ruby 2.1.6 or later, or Ruby 2.2.2 or later. The fix implements stricter hostname verification following RFC 6125, including limiting wildcard characters to the leftmost part of the hostname and implementing case-insensitive comparison (Ruby Advisory).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-68271CRITICAL10
  • RubyRuby
  • openc3
NoYesJan 13, 2026
GHSA-5qw5-wf2q-f538HIGH8.8
  • RubyRuby
  • activerecord-jdbc-adapter
NoYesJan 16, 2026
CVE-2026-22589HIGH7.5
  • RubyRuby
  • spree_core
NoYesJan 10, 2026
GHSA-mpwp-4h2m-765cMEDIUM6.6
  • RubyRuby
  • activejob
NoYesJan 16, 2026
CVE-2026-22588MEDIUM6.5
  • RubyRuby
  • spree_api
NoYesJan 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management