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

Papara will focus on M&A amid expansion, neobank's boss says

Turkish neobank Papara will continue to focus on M&A as part of its European expansion strategy, Chairman Ahmed Karslı is set to tell FinTech Magazine

Wise and Swift join forces on faster cross-border payments

Wise and Swift are joining forces to empower banks and FIs to deliver more cross-border payment optionality as part of a broader long-term partnership

Marqeta: over half of people want Gen AI help with finances

Over 50% of younger consumers want Generative AI to help them with managing their finances, according to a new report published today by Marqeta

Fintech super-app Rauva to acquire Portuguese bank for €30m

Banking

UK's Zopa Bank gets £75m of fresh funding from investors

Banking

Trustly acquires recurring payment provider SlimPay for €70m

Financial Services (FinServ)