CRITICAL 7.5

CVE-2025-14813

Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks

Description

The GOST 28147-2015 CTR mode implementation (G3413CTRBlockCipher) in the Legion of the Bouncy Castle BC-JAVA bcprov core module only increments the final byte of the counter, so the counter wraps after 255 blocks and the keystream is reused. Reusing CTR keystream allows an attacker who can observe two ciphertexts produced with the same key/IV to recover the XOR of the plaintexts, breaking confidentiality. Affects BC-JAVA from 1.59 before 1.84 (with backported fixes in 1.80.2 and 1.81.1).

Affected Maven artifacts (14)

ArtifactAffected versionsFixed in
org.bouncycastle » bcprov-debug-jdk14
>= 1.59, <= 1.80.1>= 1.82, < 1.84
1.84
org.bouncycastle » bcprov-debug-jdk15on
<= 1.7.0
-
org.bouncycastle » bcprov-debug-jdk15to18
>= 1.59, <= 1.80.1>= 1.82, < 1.84
1.84
org.bouncycastle » bcprov-debug-jdk18on
>= 1.59, <= 1.80.1>= 1.82, < 1.84
1.84
org.bouncycastle » bcprov-ext-debug-jdk14
>= 1.59, <= 1.74
-
org.bouncycastle » bcprov-ext-debug-jdk15to18
>= 1.59, <= 1.77
-
org.bouncycastle » bcprov-ext-debug-jdk18on
>= 1.59, <= 1.77
-
org.bouncycastle » bcprov-ext-jdk14
>= 1.59, <= 1.78.1
-
org.bouncycastle » bcprov-ext-jdk15to18
>= 1.59, <= 1.78.1
-
org.bouncycastle » bcprov-ext-jdk18on
>= 1.59, <= 1.78.1
-
org.bouncycastle » bcprov-jdk14
>= 1.59, <= 1.80.1>= 1.82, < 1.84
1.84
org.bouncycastle » bcprov-jdk15on
<= 1.7.0
-
org.bouncycastle » bcprov-jdk15to18
>= 1.59, <= 1.80.1>= 1.82, < 1.84
1.84
org.bouncycastle » bcprov-jdk18on
>= 1.59, < 1.80.2>= 1.81.0, < 1.81.1>= 1.82, < 1.84
1.80.2, 1.81.1, 1.84

Blast radius

13affected artifacts
184affected versions
27,086dependent artifacts (est.)
1,360,066dependent versions

62% of the dependent artifacts (16,871) still pull an affected version in their latest release.

DepthDependent versions
Direct
64,520
2 hops
248,494
3 hops
335,838
4 hops
419,997
5 hops
227,651
6 hops
63,566

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

References