# CVE-2020-15522: Timing based private key exposure in Bouncy Castle

> Timing side-channel in EC math library allows attackers to recover private keys by observing signature generation times.

- **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:** 20 May 2021
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2020-15522, GHSA-6xx3-rg99-gc3p, OESA-2021-1301, SUSE-SU-2021:2163-1, UBUNTU-CVE-2020-15522, openSUSE-SU-2021:0940-1, openSUSE-SU-2021:2163-1, openSUSE-SU-2024:12868-1

## What is CVE-2020-15522?

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

### Official description

Bouncy Castle BC Java before 1.66, BC C# .NET before 1.8.7, BC-FJA before 1.0.1.2, 1.0.2.1, and BC-FNA before 1.0.1.1 have a timing issue within the EC math library that can expose information about the private key when an attacker is able to observe timing information for the generation of multiple deterministic ECDSA signatures.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

## Which versions are affected by CVE-2020-15522?

18 open source packages ship an affected version, including org.bouncycastle:bc-fips, org.bouncycastle:bcprov-ext-jdk15on and org.bouncycastle:bcprov-ext-jdk16. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bc-fips` | Maven | All versions | 1.0.2.1 |
| `org.bouncycastle:bc-fips` | Maven | All versions | 1.0.2.1 |
| `org.bouncycastle:bcprov-ext-jdk15on` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-ext-jdk15on` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-ext-jdk16` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-ext-jdk16` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk14` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk14` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk15` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk15` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk15to18` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk15to18` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk16` | Maven | All versions | 1.66 |
| `org.bouncycastle:bcprov-jdk16` | Maven | All versions | 1.66 |
| `BouncyCastle` | NuGet | All versions | 1.8.7 |
| `BouncyCastle` | NuGet | All versions | 1.8.7 |
| `bouncycastle` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 1.64-3.3.1 |
| `bouncycastle` | SUSE:Linux Enterprise Module for Development Tools 15 SP3 | All versions | 1.64-3.3.1 |
| `bouncycastle` | openSUSE:Leap 15.2 | All versions | 1.64-lp152.2.3.1 |
| `bouncycastle` | openSUSE:Leap 15.3 | All versions | 1.64-3.3.1 |

Products: Bouncycastle Bc-Csharp, Bouncycastle Bouncy Castle Fips .Net Api, Bouncycastle Fips Java Api, Bouncycastle the Bouncy Castle Crypto Package for Java.

## How do I fix CVE-2020-15522?

Upgrade org.bouncycastle:bc-fips to 1.0.2.1 or later.

## Is CVE-2020-15522 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2026-63569](https://insights.sbomify.com/CVE-2026-63569/): MTI/A0 DHAgreement does not validate the peer's ephemeral value (critical 9.1)
- [CVE-2026-103600](https://insights.sbomify.com/CVE-2026-103600/): Unbounded ASN.1 nesting depth causes process-terminating stack overflow (high 8.7)
- [CVE-2026-103603](https://insights.sbomify.com/CVE-2026-103603/): Unbounded HSS public key level count allows huge array allocation during signature verification (high 8.7)
- [CVE-2026-103604](https://insights.sbomify.com/CVE-2026-103604/): Quadratic-time escaping when converting X.509 distinguished names to strings (high 8.7)
- [CVE-2026-16000](https://insights.sbomify.com/CVE-2026-16000/): KCcmBlockCipher (DSTU 7624 CCM) tag not bound to nonce when no associated data is used (high 8.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-15522 and fix it if it is affected.

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

Affected packages and fixed versions:
- org.bouncycastle:bc-fips (Maven): affected all versions; fixed in 1.0.2.1
- org.bouncycastle:bc-fips (Maven): affected all versions; fixed in 1.0.2.1
- org.bouncycastle:bcprov-ext-jdk15on (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-ext-jdk15on (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-ext-jdk16 (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-ext-jdk16 (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-jdk14 (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-jdk14 (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-jdk15 (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-jdk15 (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-jdk15on (Maven): affected all versions; fixed in 1.66
- org.bouncycastle:bcprov-jdk15on (Maven): affected all versions; fixed in 1.66

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

## Sources

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

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