Description
Bouncy Castle for Java before 1.73 contains a potential Denial of Service (DoS) issue within the Bouncy Castle org.bouncycastle.openssl.PEMParser class. This class parses OpenSSL PEM encoded streams containing X.509 certificates, PKCS8 encoded keys, and PKCS7 objects. Parsing a file that has crafted ASN.1 data through the PEMParser causes an OutOfMemoryError, which can enable a denial of service attack. (For users of the FIPS Java API: BC-FJA 1.0.2.3 and earlier are affected; BC-FJA 1.0.2.4 is fixed.)
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | bouncycastle | 1.77-1 | — |
| Debian 13 | bouncycastle | 1.77-1 | — |
| Debian 12 | bouncycastle | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | bouncycastle | No fix yet | — |
| Ubuntu Pro 20.04 LTS | bouncycastle | No fix yet | — |
| Ubuntu Pro 18.04 LTS | bouncycastle | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | bouncycastle | No fix yet | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | bouncycastle +6 | 1.70-4.amzn2023.0.4 | ALAS2023-2024-479 |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | gradle-8 | 8.7.0-r1 | — |
| Wolfi rolling | gradle-stage0 | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.bouncycastle:bcpkix-jdk18on | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-ext-jdk15on | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-ext-jdk16 | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-jdk14 | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-jdk15 | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-jdk15on | all versions | — | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-jdk15to18 | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-jdk16 | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
| Maven | org.bouncycastle:bcprov-jdk18on | < 1.73 | 1.73 | GHSA-wjxj-5m7g-mg7q |
Advisories 4
- WID-SEC-2023-2998 Bouncy Castle: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Oct 5, 2025
- NCSC-2025-0028 Kwetsbaarheden verholpen in Oracle Analytics NCSC-NL (Netherlands) · Jan 22, 2025
- NCSC-2024-0299 Kwetsbaarheden verholpen in Oracle Analytics NCSC-NL (Netherlands) · Jul 17, 2024
- ALAS2023-2024-479 Moderate: bouncycastle security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jan 8, 2024