{"id":"CVE-2025-46551","aliases":["GHSA-72qj-48g4-5xgx"],"url":"https://o3.security/vulnerability/CVE-2025-46551","summary":"JRuby-OpenSSL has hostname verification disabled by default","details":"### Summary\nWhen 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. \n\n### Details\nn/a\n\n### PoC\nAn 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\n\n```ruby\nrequire \"net/http\"\nrequire \"openssl\"\n\nuri   = URI(\"https://bad.substitutealert.com/\")\nhttps = Net::HTTP.new(uri.host, uri.port)\nhttps.use_ssl      = true\nhttps.verify_mode  = OpenSSL::SSL::VERIFY_PEER\n\nbody = https.start { https.get(uri.request_uri).body }\nputs body\n```\n\n### Impact\nAnybody using JRuby to make requests of external APIs, or scraping the web, that depends on https to connect securely","published":"2025-05-07T16:12:23.771Z","modified":"2026-08-12T03:51:28.766952001Z","cvss":null,"epss":{"score":0.00182,"percentile":0.07795,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Maven","name":"rubygems:jruby-openssl","fixedVersion":"0.15.4"},{"ecosystem":"Maven","name":"org.jruby:jruby","fixedVersion":"10.0.0.1"},{"ecosystem":"Maven","name":"org.jruby:jruby","fixedVersion":"9.4.12.1"},{"ecosystem":"RubyGems","name":"jruby-openssl","fixedVersion":"0.15.4"}],"fix":{"url":"https://github.com/jruby/jruby-openssl/commit/31a56d690ce9b8af47af09aaaf809081949ed285","label":"jruby/jruby-openssl@31a56d6"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46551.json"},{"type":"ADVISORY","url":"https://github.com/jruby/jruby-openssl/security/advisories/GHSA-72qj-48g4-5xgx"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46551"},{"type":"FIX","url":"https://github.com/jruby/jruby-openssl/commit/31a56d690ce9b8af47af09aaaf809081949ed285"},{"type":"WEB","url":"https://github.com/jruby/jruby-openssl/commit/b1fc5d645c0d90891b8865925ac1c15e3f15a055"},{"type":"PACKAGE","url":"https://github.com/jruby/jruby-openssl"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/jruby-openssl/CVE-2025-46551.yml"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:28.766952001Z"}}