# CVE-2018-1000613: Deserialization of Untrusted Data in Bouncy castle

> Deserializing a crafted XMSS private key in Bouncy Castle allows arbitrary code execution via unsafe reflection.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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:** 9 Jul 2018
- **Updated:** 14 Nov 2024
- **Also known as:** DEBIAN-CVE-2018-1000613, GHSA-4446-656p-f54g, ROOT-APP-MAVEN-CVE-2018-1000613, UBUNTU-CVE-2018-1000613

## What is CVE-2018-1000613?

CVE-2018-1000613 is a critical unsafe deserialization vulnerability in Bouncycastle Bc-Java, published on 9 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Legion of the Bouncy Castle Legion of the Bouncy Castle Java Cryptography APIs 1.58 up to but not including 1.60 contains a CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in XMSS/XMSS^MT private key deserialization that can result in Deserializing an XMSS/XMSS^MT private key can result in the execution of unexpected code. This attack appear to be exploitable via A handcrafted private key can include references to unexpected classes which will be picked up from the class path for the executing application. This vulnerability appears to have been fixed in 1.60 and later.

Weakness: CWE-470 (Use of Externally-Controlled Input to Select Classes or Code)

## Which versions are affected by CVE-2018-1000613?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bcprov-jdk15on` | Maven | From 1.57 | 1.60 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | From 1.57 | 1.60 |

Products: Bouncycastle Bc-Java, Netapp Oncommand Workflow Automation, Opensuse Leap, Oracle Api Gateway, Oracle Banking Platform, Oracle Business Process Management Suite, Oracle Business Transaction Management, Oracle Communications Application Session Controller, Oracle Communications Converged Application Server, Oracle Communications Convergence, Oracle Communications Diameter Signaling Router, Oracle Communications Webrtc Session Controller, Oracle Data Integrator, Oracle Enterprise Manager Base Platform, Oracle Enterprise Manager for Fusion Middleware, Oracle Enterprise Repository, Oracle Managed File Transfer, Oracle Peoplesoft Enterprise Peopletools, Oracle Retail Convenience and Fuel Pos Software, Oracle Retail Xstore Point of Service and 4 more.

## How do I fix CVE-2018-1000613?

Upgrade org.bouncycastle:bcprov-jdk15on to 1.60 or later.

## Is CVE-2018-1000613 being exploited?

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

## Other vulnerabilities in Bouncycastle Bc-Java

- [CVE-2007-6721](https://insights.sbomify.com/CVE-2007-6721/): Legion of the Bouncy Castle Java Cryptography API Bleichenbacher Oracle Vulnerability (critical 10.0)
- [CVE-2026-58062](https://insights.sbomify.com/CVE-2026-58062/): Stapled OCSP response accepted without binding to the checked certificate (critical 9.3)
- [CVE-2026-59638](https://insights.sbomify.com/CVE-2026-59638/): JSSE hostname verifier CN-fallback enabled by default despite documented opt-in (critical 9.3)
- [CVE-2026-59650](https://insights.sbomify.com/CVE-2026-59650/): MTI/A0 DH agreement exponentiates unvalidated peer value (critical 9.3)
- [CVE-2026-8763](https://insights.sbomify.com/CVE-2026-8763/): Name Constraints bypass via trailing dot in rfc822Name and URI (critical 9.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-1000613 and fix it if it is affected.

What it is: CVE-2018-1000613 is a critical unsafe deserialization vulnerability in Bouncycastle Bc-Java, published on 9 Jul 2018. 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-2018-1000613 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.bouncycastle:bcprov-jdk15on (Maven): affected from 1.57; fixed in 1.60
- org.bouncycastle:bcprov-jdk15on (Maven): affected from 1.57; fixed in 1.60

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-2018-1000613/ (Markdown: https://insights.sbomify.com/CVE-2018-1000613/index.md)
```

## Sources

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

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