# CVE-2025-46551: JRuby-OpenSSL has hostname verification disabled by default

> JRuby-OpenSSL fails to verify hostnames in SSL certificates, allowing man-in-the-middle attacks against applications using JRuby for secure connections.

- **Severity:** Medium 5.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 May 2025
- **Updated:** 7 May 2025
- **Also known as:** CLEANSTART-2026-OD65831, ECHO-b49a-ed3a-3f0a, GHSA-72qj-48g4-5xgx, MINI-775v-qpmr-4f92, MINI-9mh2-2r3m-m99q, MINI-mg84-gfww-c4fc, MINI-ph42-7rvj-qv2q, MINI-vqvj-prg7-mj3x, UBUNTU-CVE-2025-46551

## What is CVE-2025-46551?

CVE-2025-46551 is a medium-severity vulnerability in jruby-openssl, published on 7 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library. Starting in JRuby-OpenSSL version 0.12.1 and prior to version 0.15.4 (corresponding to JRuby versions starting in 9.3.4.0 prior to 9.4.12.1 and 10.0.0.0 prior to 10.0.0.1), when verifying SSL certificates, JRuby-OpenSSL does not verify that the hostname presented in the certificate matches the one the user tries to connect to. This means a man-in-the-middle could just present any valid cert for a completely different domain they own, and JRuby would accept the cert. Anybody using JRuby to make requests of external APIs, or scraping the web, that depends on https to connect securely. JRuby-OpenSSL version 0.15.4 contains a fix for the issue. This fix is included in JRuby versions 10.0.0.1 and 9.4.12.1.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2025-46551?

8 open source packages ship an affected version, including rubygems:jruby-openssl, org.jruby:jruby and jruby-openssl. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rubygems:jruby-openssl` | Maven | From 0.12.1 | 0.15.4 |
| `rubygems:jruby-openssl` | Maven | From 0.12.1 | 0.15.4 |
| `org.jruby:jruby` | Maven | From 10.0.0.0 | 10.0.0.1 |
| `org.jruby:jruby` | Maven | From 10.0.0.0 | 10.0.0.1 |
| `org.jruby:jruby` | Maven | From 9.3.4.0 | 9.4.12.1 |
| `org.jruby:jruby` | Maven | From 9.3.4.0 | 9.4.12.1 |
| `jruby-openssl` | RubyGems | From 0.12.1 | 0.15.4 |
| `jruby-openssl` | RubyGems | From 0.12.1 | 0.15.4 |

Products: Jruby Jruby, Jruby Jruby-Openssl.

## How do I fix CVE-2025-46551?

Upgrade rubygems:jruby-openssl to 0.15.4 or later.

## Is CVE-2025-46551 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46551 exists.

## Other vulnerabilities in jruby-openssl

- [CVE-2012-5370](https://insights.sbomify.com/CVE-2012-5370/): JRuby denial of service via Hash Collision (medium 5.0)
- [CVE-2011-4838](https://insights.sbomify.com/CVE-2011-4838/): Denial of service in n/a (medium 5.0)
- [CVE-2010-1330](https://insights.sbomify.com/CVE-2010-1330/): Cross-site Scripting in in JRuby (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-46551 and fix it if it is affected.

What it is: CVE-2025-46551 is a medium-severity vulnerability in jruby-openssl, published on 7 May 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46551 exists.

Affected packages and fixed versions:
- rubygems:jruby-openssl (Maven): affected from 0.12.1; fixed in 0.15.4
- rubygems:jruby-openssl (Maven): affected from 0.12.1; fixed in 0.15.4
- org.jruby:jruby (Maven): affected from 10.0.0.0; fixed in 10.0.0.1
- org.jruby:jruby (Maven): affected from 10.0.0.0; fixed in 10.0.0.1
- org.jruby:jruby (Maven): affected from 9.3.4.0; fixed in 9.4.12.1
- org.jruby:jruby (Maven): affected from 9.3.4.0; fixed in 9.4.12.1
- jruby-openssl (RubyGems): affected from 0.12.1; fixed in 0.15.4
- jruby-openssl (RubyGems): affected from 0.12.1; fixed in 0.15.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-46551/ (Markdown: https://insights.sbomify.com/CVE-2025-46551/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-46551
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-46551
- OSV: https://osv.dev/vulnerability/CVE-2025-46551

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-46551/
Summaries are generated and may contain mistakes; the official description above is the record.
