Vulnerabilities in pkg:gem/jruby-openssl

PACKAGE
Advisory Identifier: GHSA-72qj-48g4-5xgx
Advisory Summary

CVE-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.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/jruby-openssl

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/jruby-openssl. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-72qj-48g4-5xgx CVE-2025-46551 MODERATE JRuby-OpenSSL has hostname verification disabled by default
GHSA-xgv7-pqqh-h2w9 CVE-2009-4123 HIGH jruby-openssl gem for JRuby fails to do proper certificate validation

CVE-2025-46551 at a Glance

CVE Identifier CVE-2025-46551
GHSA Identifier GHSA-72qj-48g4-5xgx
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Jruby openssl
Package Ecosystem Maven
Published Date
Last Updated

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.

rubygems:jruby-openssl fixed: 0.15.4
<dependency>
    <groupId>rubygems</groupId>
    <artifactId>jruby-openssl</artifactId>
    <version>0.15.4</version>
</dependency>
org.jruby:jruby fixed: 10.0.0.1
<dependency>
    <groupId>org.jruby</groupId>
    <artifactId>jruby</artifactId>
    <version>10.0.0.1</version>
</dependency>
org.jruby:jruby fixed: 9.4.12.1
<dependency>
    <groupId>org.jruby</groupId>
    <artifactId>jruby</artifactId>
    <version>9.4.12.1</version>
</dependency>
jruby-openssl fixed: 0.15.4
Upgrade jruby-openssl to 0.15.4
Verify Direct and Transitive Dependencies

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

### 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 ```ruby 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

CVE-2025-46551 Affected Jruby openssl Versions

4 component(s)
Fixed Versions:
0.15.410.0.0.19.4.12.1
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?
CVE-2025-46551 is a security vulnerability in Jruby openssl involving JRuby-OpenSSL has hostname verification disabled by default under CWE-295: Improper Certificate Validation.
Which Jruby openssl versions are affected?
Affected versions include releases prior to 0.15.4, 10.0.0.1, 9.4.12.1 across affected packages: rubygems:jruby-openssl, org.jruby:jruby, jruby-openssl.
What version fixes CVE-2025-46551?
Upgrading to 0.15.4, 10.0.0.1, 9.4.12.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jruby-openssl affected?
Yes, rubygems:jruby-openssl is affected in releases prior to 0.15.4. Upgrade your dependency to 0.15.4 or later.
Is jruby affected?
Yes, org.jruby:jruby is affected in releases prior to 10.0.0.1, 9.4.12.1. Upgrade your dependency to 10.0.0.1, 9.4.12.1 or later.
What CWE is associated with CVE-2025-46551?
CVE-2025-46551 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check Maven dependencies for CVE-2025-46551?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=rubygems'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}