jruby icon indicating copy to clipboard operation
jruby copied to clipboard

Update jruby-openssl to v0.15.5 to resolve BouncyCastle 1.79 vulnerability (sonatype-2025-001911).

Open xavifeds8 opened this issue 1 year ago • 2 comments

JRuby currently bundles jruby-openssl v0.15.4, which includes BouncyCastle 1.79 that has a known security vulnerability. An updated version of jruby-openssl (v0.15.5) with BouncyCastle 1.81 is available but has not been incorporated into any JRuby release yet. Please update JRuby to use jruby-openssl v0.15.5 or later in the next release to resolve this security vulnerability.

Bouncy Castle is vulnerable due to the Use of Weak Hash. The createClone() method in the DigestFactory$2.class class does not properly clone SHA-1 hashes. An unsuspected developer can use the vulnerable method to perform cryptographic operations, exposing the application to collision attacks.

references:-

  1. https://github.com/jruby/jruby-openssl/compare/v0.15.4...v0.15.5#diff-182445848759e3e1da029cd16c16c6f7c30b5d81c1efa71ffd11f52d8da2fa65
  2. https://cwe.mitre.org/data/definitions/328.html
  3. https://github.com/bcgit/bc-java/commit/8ecc0b3281f0d563a9570e650eb78958128255ad

xavifeds8 avatar Nov 28 '25 09:11 xavifeds8

Good catch; the fix was released but not updated in JRuby proper.

Both 9.4 and 10 should get this update.

headius avatar Dec 02 '25 07:12 headius

FYI for those following along, you can update jruby-openssl independent of JRuby and activate it, so this moderate security issue has a quick workaround.

We'll include the latest jruby-openssl in 10.0.3.0 and 9.4.15.0.

headius avatar Dec 02 '25 07:12 headius