CVE-2025-46551: Jruby openssl JRuby-OpenSSL Has Hostname Verification Disabled Vulnerability
MODERATECVE-2025-46551 is a MODERATE jruby-openssl has hostname verification disabled vulnerability (CWE-295: Improper Certificate Validation) affecting Jruby openssl libraries in the Maven ecosystem. The issue involves jruby-openssl has hostname verification disabled by default. Remediation is available by upgrading affected packages to version 0.15.4, 10.0.0.1, 9.4.12.1.
CVE-2025-46551 at a Glance
How to Fix CVE-2025-46551
To remediate this vulnerability, upgrade all affected Jruby openssl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>rubygems</groupId>
<artifactId>jruby-openssl</artifactId>
<version>0.15.4</version>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>10.0.0.1</version>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>9.4.12.1</version>
</dependency>
Upgrade jruby-openssl to 0.15.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=rubygems
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-46551, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=rubygems
Analyze the terminal output to locate any version of Jruby openssl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.4), your application is affected.
Note: The mvn dependency:tree -Dincludes=rubygems command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Jruby openssl, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-46551 Affected Jruby openssl Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rubygems:jruby-openssl
|
Maven |
≥ 0.12.1
< 0.15.4
|
0.15.4
|
|
org.jruby:jruby
|
Maven |
≥ 10.0.0.0
< 10.0.0.1
|
10.0.0.1
|
|
org.jruby:jruby
|
Maven |
≥ 9.3.4.0
< 9.4.12.1
|
9.4.12.1
|
|
jruby-openssl
|
RubyGems |
≥ 0.12.1
< 0.15.4
|
0.15.4
|
References
Frequently Asked Questions
What is CVE-2025-46551?
Which Jruby openssl versions are affected?
What version fixes CVE-2025-46551?
Is jruby-openssl affected?
Is jruby affected?
What CWE is associated with CVE-2025-46551?
How can I check Maven dependencies for CVE-2025-46551?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-72qj-48g4-5xgx",
"modified" : "2026-01-21T16:54:31Z",
"published" : "2025-05-07T17:32:54Z",
"aliases" : [ "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",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "rubygems:jruby-openssl"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.12.1"
}, {
"fixed" : "0.15.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.jruby:jruby"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.0.0.0"
}, {
"fixed" : "10.0.0.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.jruby:jruby"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.3.4.0"
}, {
"fixed" : "9.4.12.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "jruby-openssl"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.12.1"
}, {
"fixed" : "0.15.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"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" : "WEB",
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295", "CWE-297" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-07T17:32:54Z",
"nvd_published_at" : "2025-05-07T17:15:58Z"
}
}