# CVE-2024-30171: Bouncy Castle affected by timing side-channel for RSA key exchange ("The Marvin Attack")

> Attackers can exploit timing side-channels in RSA handshakes to leak sensitive information from Bouncy Castle Java TLS implementations.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 May 2024
- **Updated:** 19 Aug 2024
- **Also known as:** CLEANSTART-2026-XT25506, CLEANSTART-2026-YR80525, DEBIAN-CVE-2024-30171, GHSA-v435-xc8x-wvr9, MINI-j94h-8875-98rh, ROOT-APP-MAVEN-CVE-2024-30171, SUSE-SU-2024:1539-1, SUSE-SU-2024:1539-2, UBUNTU-CVE-2024-30171

## What is CVE-2024-30171?

CVE-2024-30171 is a medium-severity vulnerability in n/a, published on 9 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue was discovered in Bouncy Castle Java TLS API and JSSE Provider before 1.78. Timing-based leakage may occur in RSA based handshakes because of exception processing.

Weakness: CWE-203 (Observable Discrepancy)

## Which versions are affected by CVE-2024-30171?

20 open source packages ship an affected version, including org.bouncycastle:bcprov-jdk14, org.bouncycastle:bcprov-jdk15on and org.bouncycastle:bcprov-jdk15to18.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bcprov-jdk14` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk14` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk15to18` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk15to18` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk18on` | Maven | All versions | 1.78 |
| `org.bouncycastle:bcprov-jdk18on` | Maven | All versions | 1.78 |
| `org.bouncycastle:bctls-fips` | Maven | All versions | 1.0.19 |
| `org.bouncycastle:bctls-fips` | Maven | All versions | 1.0.19 |
| `org.bouncycastle:bctls-jdk14` | Maven | All versions | 1.78 |
| `org.bouncycastle:bctls-jdk14` | Maven | All versions | 1.78 |
| `org.bouncycastle:bctls-jdk15to18` | Maven | All versions | 1.78 |
| `org.bouncycastle:bctls-jdk15to18` | Maven | All versions | 1.78 |
| `org.bouncycastle:bctls-jdk18on` | Maven | All versions | 1.78 |
| `org.bouncycastle:bctls-jdk18on` | Maven | All versions | 1.78 |
| `BouncyCastle` | NuGet | All versions | None |
| `BouncyCastle` | NuGet | All versions | None |
| `BouncyCastle.Cryptography` | NuGet | All versions | 2.3.1 |
| `BouncyCastle.Cryptography` | NuGet | All versions | 2.3.1 |
| `bouncycastle` | SUSE:Enterprise Storage 7.1 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Module for Development Tools 15 SP5 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Module for Development Tools 15 SP6 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | openSUSE:Leap 15.5 | All versions | 1.78.1-150200.3.29.1 |
| `bouncycastle` | openSUSE:Leap 15.6 | All versions | 1.78.1-150200.3.29.1 |

## How do I fix CVE-2024-30171?

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

## Is CVE-2024-30171 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-30171 and fix it if it is affected.

What it is: CVE-2024-30171 is a medium-severity vulnerability in n/a, published on 9 May 2024. 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-2024-30171 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.bouncycastle:bcprov-jdk14 (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk14 (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk15on (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk15on (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk15to18 (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk15to18 (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk18on (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bcprov-jdk18on (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bctls-fips (Maven): affected all versions; fixed in 1.0.19
- org.bouncycastle:bctls-fips (Maven): affected all versions; fixed in 1.0.19
- org.bouncycastle:bctls-jdk14 (Maven): affected all versions; fixed in 1.78
- org.bouncycastle:bctls-jdk14 (Maven): affected all versions; fixed in 1.78

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

## Sources

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

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