JRuby-OpenSSL has hostname verification disabled by default
Moderate severity
GitHub Reviewed
Published
May 7, 2025
in
jruby/jruby-openssl
•
Updated May 7, 2025
Description
Published by the National Vulnerability Database
May 7, 2025
Published to the GitHub Advisory Database
May 7, 2025
Reviewed
May 7, 2025
Last updated
May 7, 2025
Summary
When verifying SSL certificates, jruby-openssl is not verifying that the hostname presented in the certificate matches the one we are trying to connect to, meaning a MITM could just present any valid cert for a completely different domain they own, and JRuby wouldn't complain.
Details
n/a
PoC
An example domain bad.substitutealert.com was created to present the a certificate for the domain s8a.me. The following script run in IRB in CRuby 3.4.3 will fail with
certificate verify failed (hostname mismatch)
, but will work just fine in JRuby 10.0.0.0 and JRuby 9.4.2.0, both of which use jruby-openssl version 0.15.3Impact
Anybody using JRuby to make requests of external APIs, or scraping the web, that depends on https to connect securely
References