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

Remote: Choosing the Right Employer of Record

Remote walks through the green flags to seek and the red flags to avoid when choosing the right employer of record (EOR) for global business expansion

FinTech LIVE London 2024: Key Themes – Part Two

We explore some of the key themes for our upcoming FinTech LIVE London 2024 event, providing you with even more reasons to join us virtually or in-person

FinTech LIVE London: Introducing Three New Speakers

FinTech LIVE London 2024 welcomes Wendy Redshaw, Joanna Pamphilis and Steve Round as the latest speakers joining the show this October

FinTech LIVE London: Group Speaker Announcement

Financial Services (FinServ)

FinTech LIVE London 2024: Key Themes

Financial Services (FinServ)

Want to Become a Media Partner of FinTech LIVE London 2024?

Financial Services (FinServ)