CVE-2025-14813: GOSTCTR implementation unable to process more than 255 blocks correctly
: Use of a Broken or Risky Cryptographic Algorithm vulnerability in Legion of the Bouncy Castle Inc. BC-JAVA bcprov on all (core modules).
This vulnerability is associated with program files G3413CTRBlockCipher.
This issue affects BC-JAVA: from 1.59 before 1.80.2, from 1.81 before 1.81.1, from 1.82 before 1.84.
Other sources
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).
— GitHub
Use of a Broken or Risky Cryptographic Algorithm vulnerability in Legion of the Bouncy Castle Inc. BC-JAVA bcprov on all (core modules). This vulnerability is associated with program files G3413CTRBlockCipher.
GOSTCTR implementation unable to process more than 255 blocks correctly.
This issue affects BC-JAVA: from 1.59 before 1.84.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.bouncycastle:bcprov-debug-jdk18onto a version that resolves this vulnerability.Fixed in 1.84 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-debug-jdk15to18to a version that resolves this vulnerability.Fixed in 1.84 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-debug-jdk14to a version that resolves this vulnerability.Fixed in 1.84 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-jdk18onto a version that resolves this vulnerability.Fixed in 1.84 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-jdk15to18to a version that resolves this vulnerability.Fixed in 1.84 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-jdk14to a version that resolves this vulnerability.Fixed in 1.84 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-jdk18onto a version that resolves this vulnerability.Fixed in 1.81.1 - Upgrade
Upgrade
maven/org.bouncycastle:bcprov-jdk18onto a version that resolves this vulnerability.Fixed in 1.80.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.80.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.81.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.84
Event History
Frequently Asked Questions
What is the severity of CVE-2025-14813?
The severity of CVE-2025-14813 is categorized as high due to the potential for cryptographic weaknesses.
How do I fix CVE-2025-14813?
You can fix CVE-2025-14813 by upgrading to a version of Bouncy Castle BC-JAVA (bcprov) later than 1.84.
Which versions of Bouncy Castle BC-JAVA (bcprov) are affected by CVE-2025-14813?
Bouncy Castle BC-JAVA (bcprov) versions from 1.59 to 1.84 are affected by CVE-2025-14813.
What types of applications are impacted by CVE-2025-14813?
Applications that utilize the GOSTCTR implementation in Bouncy Castle BC-JAVA (bcprov) are impacted by CVE-2025-14813.
Is there a workaround for CVE-2025-14813?
There is no official workaround for CVE-2025-14813, and upgrading the library is the recommended approach to mitigate the vulnerability.