Bouncy Castle native CTR cipher reuses keystream after counter wraps
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
Legion of the Bouncy Castle BC-LTS-JAVA from 2.73.4 before 2.73.13 has a flaw in its native one-shot CTR packet cipher, which does not check that the input length fits the counter space left by the IV (CWE-323). With an IV of 13 to 15 bytes, a longer input wraps the counter so the keystream repeats within the same packet, yet the call returns the full input length. An attacker holding only the ciphertext can recover plaintext without the key, and the caller sees no error.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
In Bouncy Castle for Java LTS before 2.73.13, the native one-shot CTR packet cipher did not check that the requested input length fitted the counter space the IV left. In CTR mode the IV and the block counter share one 16-byte block, so an IV of 13 to 15 bytes leaves a counter of only 1 to 3 bytes, addressing 256, 65536 or 16777216 blocks respectively. Given a longer input the counter wrapped and the keystream repeated from the start of the same packet, and the call then returned the full input length as though every byte had been correctly transformed. Two segments of the message were therefore encrypted under the same keystream, so their plaintexts can be recovered from the ciphertext alone, without the key, while the caller saw neither an exception nor a short length to indicate it. The streaming implementation validates at init and again while processing, and the portable AESCTRPacketCipher rejects such a request with "Counter in CTR/SIC mode out of range.", but the native one-shot path has a single entry point and performed no counter-range validation there. It now preflights the IV-derived counter range and rejects an over-long request before any output is written, so the operation is failure-atomic and never reports success for bytes it did not correctly transform. A counter of four bytes or more cannot be exhausted by a Java int length and is unaffected, as is a full 16-byte IV, where the counter range is the caller's responsibility. Bouncy Castle for Java (bcprov) is not affected, as it ships no native implementations.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Legion of the Bouncy Castle Inc. | BC-LTS-JAVA | 2.73.4 to before 2.73.13 | 2.73.13 | Patch available | CNA |
- BC-LTS-JAVA VendorLegion of the Bouncy Castle Inc. Affected 2.73.4 to before 2.73.13 Fixed in 2.73.13 Patch available CNA
Remediation
Upgrade Legion of the Bouncy Castle BC-LTS-JAVA to 2.73.13. Red Hat build of Apicurio Registry 3 is affected, and Red Hat reports no available fix plan for it.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA BC-LTS-JAVA (Legion of the Bouncy Castle Inc.) Fixed in 2.73.13
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat build of Apicurio Registry 3 | Affected | No fix yet |
Timeline
- 2026-10-09 Threatist record created from CVE-2026-71884
- 2026-10-09 Alias added: GHSA-qgfp-x9w9-pwj2
- 2026-10-11 Priority changed: MEDIUM → LOW
- 2026-10-13 Affected versions changed · Red Hat
- 2026-10-13 CVSS score added · Red Hat
- 2026-10-16 CISA SSVC decision points changed
- 2026-10-16 Priority changed: LOW → MEDIUM
References
More Legion of the Bouncy Castle Inc. vulnerabilities
- TI-2018-15967 Legion of the Bouncy Castle Legion of the Bouncy Castle Java Cryptography APIs 1.58 up to… CVSS 3.1CRITICAL 9.8
- TI-2017-09736 BouncyCastle JCE TLS Bleichenbacher/ROBOT CVSS 3.0HIGH 7.5
- TI-2026-42545 MTI/A0 DH agreement exponentiates unvalidated peer value CVSS 4.0CRITICAL 9.3
- TI-2026-42533 JSSE hostname verifier CN-fallback enabled by default despite documented opt-in CVSS 4.0CRITICAL 9.3
- TI-2026-41816 Stapled OCSP response accepted without binding to the checked certificate CVSS 4.0CRITICAL 9.3
- TI-2026-07701 Name Constraints bypass via trailing dot in rfc822Name and URI CVSS 4.0CRITICAL 9.3
Sources
- CVE-2026-71884 · CVE Program
- CVE-2026-71884 · NVD
- FIRST EPSS
- GHSA-qgfp-x9w9-pwj2 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-71884 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences