Sonatype examines Bouncycastle’s open source vulnerabilities

By William Girling
In the continuation of our series examining Sonatype’s White Paper, we explore the specific open source vulnerabilities of Bouncycastle...

In the continuation of our series examining Sonatype’s White Paper, we explore the specific open source vulnerabilities of Bouncycastle.

Ranked fifth on the most vulnerable open source components commonly used by Financial Services organisations list, Bouncycastle first originated in the late 90s as an effort by creators to combine their dual interests in cryptography and open source. It saw its first API released in 2000 at 27,000 lines long, which was subsequently eclipsed in 2012 with a Java code base in excess of 300,000 lines and a C# iteration of over 140,000.

Identifying its primary vulnerability as ‘information exposure’ (vulnerability CVE-2018-5382), the severity of the problem is summarised by Sonatype as follows: 

Bouncy Castle BKS version 1 file is vulnerable to a brute force breach using associated metadata with a file format kept largely unprotected by default.” The following components are affected:

  • org.bouncycastle : bcprov-jdk14 : ( , 1.47)
  • org.bouncycastle : bcprov-jdk15on : ( , 1.47)
  • org.bouncycastle : bcprov-jdk16 : ( , )

The reason for this exposure lies in the package’s less-than-desirable encryption strength. The highly vulnerable ‘engineLoad()` function (part of the ‘JDKKeyStore.class` file) uses the aforementioned BKS V1 file, meaning that sensitive data can easily be compromised. 

Attack mechanics and remediation procedure

A brute force timing or side-channel attack manifests itself by flooding a system with multiple values at once. The perpetrator can then deduce information from the time it takes to generate an incorrect answer from a correct one. 

Ultimately, the root cause for the vulnerability is the BKS V1’s outdated 16-bit HMAC (keyed-hash message authentication code), which simply cannot repel the capabilities of modern hardware.

Sonatype’s recommended course of remediation is simple: upgrade to version 1.47 or newer. This update boosts the HMAC to a far more substantial 160-bit, which is enough to resolve the CVE-2018-5382 vulnerability.

The whitepaper adds, “For users of `org.bouncycastle:bcprov-jdk14` and `org.bouncycastle:bcprov-jdk15on` components, upgrading to version 1.47

is the recommended solution.

“However, a fixed version for `org.bouncycastle:bcprov-jdk16` component does not exist in Maven Central as of writing this piece.”

Share

Featured Articles

Top 100 Women 2024: Sun Kwon-Wishik, Wells Fargo – No. 2

FinTech Magazine’s Top 100 Women in FinTech honours Wells Fargo Securities' Sun Kwon-Wishik at Number 2 for 2024

Top 100 Women 2024: Wendy Stewart, Bank of America – No. 1

FinTech Magazine’s Top 100 Women in FinTech honours Bank of America’s Wendy Stewart at Number 1 for 2024

Want to Become a Sponsor of FinTech LIVE in 2024?

Put your brand in front of thousands of attendees at FinTech LIVE in 2024 by becoming a sponsor of one of our events

KPMG Launches New Fintech Platform – KPMG Digital Finance

Financial Services (FinServ)

Global Payments: Embedded Finance Reshapes Consumer Journeys

Financial Services (FinServ)

Worldpay Report: Consumers Driving Golden Era of Payments

Digital Payments