# CVE-2019-17359: Out-of-Memory Error in Bouncy Castle Crypto

> Crafted ASN.1 data triggers excessive memory allocation in Bouncy Castle Crypto, causing an OutOfMemoryError and denial of service.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Oct 2019
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-2mh8-gx2m-mr75

## What is CVE-2019-17359?

CVE-2019-17359 is a high-severity denial of service vulnerability in Bouncycastle Bc-Java, published on 8 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The ASN.1 parser in Bouncy Castle Crypto (aka BC Java) 1.63 can trigger a large attempted memory allocation, and resultant OutOfMemoryError error, via crafted ASN.1 data. This is fixed in 1.64.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2019-17359?

2 open source packages ship an affected version, including org.bouncycastle:bcprov-jdk14. It affects 21 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bcprov-jdk14` | Maven | From 1.63 | 1.64 |
| `org.bouncycastle:bcprov-jdk14` | Maven | From 1.63 | 1.64 |

Products: Apache Tomee, Bouncycastle Bc-Java, Netapp Active Iq Unified Manager, Netapp Oncommand Api Services, Netapp Oncommand Workflow Automation, Netapp Service Level Manager, Oracle Business Process Management Suite, Oracle Communications Convergence, Oracle Communications Diameter Signaling Router, Oracle Communications Session Route Manager, Oracle Data Integrator, Oracle Financial Services Analytical Applications Infrastructure, Oracle Flexcube Private Banking, Oracle Hospitality Guest Access, Oracle Managed File Transfer, Oracle Peoplesoft Enterprise Hcm Global Payroll Switzerland, Oracle Peoplesoft Enterprise Peopletools, Oracle Retail Xstore Point of Service, Oracle Soa Suite, Oracle Webcenter Portal and 1 more.

## How do I fix CVE-2019-17359?

Upgrade org.bouncycastle:bcprov-jdk14 to 1.64 or later.

## Is CVE-2019-17359 being exploited?

There is no known exploitation of CVE-2019-17359 in the wild and no public exploit code.

## Other vulnerabilities in Bouncycastle Bc-Java

- [CVE-2020-13931](https://insights.sbomify.com/CVE-2020-13931/): Remote code execution in Apache TomEE (critical 9.8)
- [CVE-2020-11969](https://insights.sbomify.com/CVE-2020-11969/): Missing Authentication for Critical Function in Apache TomEE (critical 9.8)
- [CVE-2019-13990](https://insights.sbomify.com/CVE-2019-13990/): XML external entity injection in Terracotta Quartz Scheduler (critical 9.8)
- [CVE-2016-0779](https://insights.sbomify.com/CVE-2016-0779/): Deserialization in n/a (critical 9.8)
- [CVE-2018-8031](https://insights.sbomify.com/CVE-2018-8031/): Apache TomEE console vulnerable to Cross-site Scripting (medium 6.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-17359 and fix it if it is affected.

What it is: CVE-2019-17359 is a high-severity denial of service vulnerability in Bouncycastle Bc-Java, published on 8 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-17359 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.bouncycastle:bcprov-jdk14 (Maven): affected from 1.63; fixed in 1.64
- org.bouncycastle:bcprov-jdk14 (Maven): affected from 1.63; fixed in 1.64

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-17359/ (Markdown: https://insights.sbomify.com/CVE-2019-17359/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-17359
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-17359
- OSV: https://osv.dev/vulnerability/CVE-2019-17359

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-17359/
Summaries are generated and may contain mistakes; the official description above is the record.
