Summary
JRuby-OpenSSL has hostname verification disabled by default
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.3
require "net/http"
require "openssl"
uri = URI("https://bad.substitutealert.com/")
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
body = https.start { https.get(uri.request_uri).body }
puts body
Impact
Anybody using JRuby to make requests of external APIs, or scraping the web, that depends on https to connect securely
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
rubygems:jruby-openssl to 0.15.4 or later; org.jruby:jruby to 10.0.0.1 or later; org.jruby:jruby to 9.4.12.1 or later; jruby-openssl to 0.15.4 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-46551? CVE-2025-46551 is a medium-severity security vulnerability in rubygems:jruby-openssl (maven), affecting versions >= 0.12.1, < 0.15.4. It is fixed in 0.15.4, 10.0.0.1, 9.4.12.1.
- Which packages are affected by CVE-2025-46551?
rubygems:jruby-openssl(maven) (versions >= 0.12.1, < 0.15.4)org.jruby:jruby(maven) (versions >= 10.0.0.0, < 10.0.0.1)jruby-openssl(rubygems) (versions >= 0.12.1, < 0.15.4)
- Is there a fix for CVE-2025-46551? Yes. CVE-2025-46551 is fixed in 0.15.4, 10.0.0.1, 9.4.12.1. Upgrade to this version or later.
- Is CVE-2025-46551 exploitable, and should I be worried? Whether CVE-2025-46551 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-46551 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-46551?
- Upgrade
rubygems:jruby-opensslto 0.15.4 or later - Upgrade
org.jruby:jrubyto 10.0.0.1 or later - Upgrade
org.jruby:jrubyto 9.4.12.1 or later - Upgrade
jruby-opensslto 0.15.4 or later
- Upgrade