CVE-2019-17359: Out-of-Memory Error in Bouncy Castle Crypto
Summary
CVE-2019-17359: Out-of-Memory Error in Bouncy Castle Crypto. Affects org.bouncycastle:bcprov-jdk14 versions >= 1.63, < 1.64. Fixed in 1.64. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Bouncy Castle Crypto (aka BC Java) is an open-source cryptographic library that provides a wide range of cryptographic algorithms and protocols. It is commonly used in Java applications for secure communication, encryption, and digital signatures. The affected package, org.bouncycastle:bcprov-jdk14, is a specific version of Bouncy Castle Crypto designed for Java 1.4 compatibility. This vulnerability, identified as CVE-2019-17359, allows an attacker to trigger an OutOfMemoryError by exploiting a flaw in the ASN.1 parser of Bouncy Castle Crypto version 1.63. This can be achieved by providing specially crafted ASN.1 data, leading to a large attempted memory allocation. The issue was fixed in version 1.64 of the library.
Vulnerability Detail
The vulnerability in Bouncy Castle Crypto arises from a flaw in the ASN.1 parser. By supplying maliciously crafted ASN.1 data, an attacker can trigger a large memory allocation attempt, causing an OutOfMemoryError. This can result in denial of service (DoS) conditions, as the application may crash or become unresponsive. The severity of this vulnerability is rated as HIGH, with a CVSS score of 7.5. The Common Weakness Enumeration (CWE) identifier associated with this vulnerability is CWE-770.
How To Fix
Latest published version: 1.86 as of 22 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.64
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to apply the fix by upgrading to a non-vulnerable version of the Bouncy Castle Crypto library.
Conclusion
The vulnerability in Bouncy Castle Crypto (org.bouncycastle:bcprov-jdk14) allows an attacker to trigger an OutOfMemoryError by providing specially crafted ASN.1 data. To mitigate this issue, it is recommended to upgrade to version 1.64 or later of the library. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.bouncycastle:bcprov-jdk14 →
FAQ
Bouncy Castle Crypto is an open-source cryptographic library for Java applications, providing various cryptographic algorithms and protocols.
This vulnerability can lead to denial of service (DoS) conditions, as the application may crash or become unresponsive.
To fix this vulnerability, upgrade the affected package, org.bouncycastle:bcprov-jdk14, to version 1.64 or later.
No, there is no known workaround for this vulnerability. It is crucial to apply the fix by upgrading to a non-vulnerable version.
The severity of this vulnerability is rated as HIGH, with a CVSS score of 7.5.
Related vulnerabilities
Recent vulnerabilities recorded for org.bouncycastle:bcprov-jdk14.