CVE-2025-46551 — jruby-openssl
Fix: jruby/jruby-openssl@31a56d6CVE-2025-46551 is a CWE-295 vulnerability in rubygems:jruby-openssl. A fix is available for rubygems:jruby-openssl — see the affected versions and patch details below.
JRuby-OpenSSL has hostname verification disabled by default
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-46551.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
rubygems:jruby-openssl☕org.jruby:jruby☕org.jruby:jruby💎jruby-opensslReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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.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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | rubygems:jruby-openssl | ≥ 0.12.1&&< 0.15.4 | 0.15.4rubygems:jruby-openssl:0.15.4 |
| ☕Maven | org.jruby:jruby | ≥ 10.0.0.0&&< 10.0.0.1 | 10.0.0.1org.jruby:jruby:10.0.0.1 |
| ☕Maven | org.jruby:jruby | ≥ 9.3.4.0&&< 9.4.12.1 | 9.4.12.1org.jruby:jruby:9.4.12.1 |
| 💎RubyGems | jruby-openssl | ≥ 0.12.1&&< 0.15.4 | 0.15.4bundle update jruby-openssl --conservative |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rubygems:jruby-openssl, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update rubygems:jruby-openssl to 0.15.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-46551 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-46551 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2025-46551. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2025-46551 in your dependencies?
O3 Security finds CVE-2025-46551 across Maven, RubyGems dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.