Bouncy Castle LTS native AES packet aliasing can return the raw key
Bouncy Castle Java LTS native one-shot AES packet ciphers could return a raw AES key where an application expected ciphertext when its output aliases its own key array. Versions 2.73.4 through 2.73.12 are affected on x86 or x86-64 with native support enabled; version 2.73.13 fixes the defect. Ordinary BC-Java, pure-Java packet ciphers and streaming native modes are unaffected.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
On a JVM that copies the key array for JNI access, the native output was committed before read-only input arrays. A later mode-0 JNI release copied the original key bytes back over the output, while the API still returned the expected output length. An application encrypting in place over KeyParameter.getKey() could therefore transmit or store its raw key as ciphertext.
The fix releases read-only inputs with JNI_ABORT, preventing stale input copies from overwriting output. It covers the native CBC, CCM, CFB, CTR, GCM and GCM-SIV packet entry points in bcprov-lts8on. Fixed LTS 2.73.13 was released September 22, 2026; the vendor advisory is dated October 2 and this event uses CVE publication on October 3. This is a conditional buffer-aliasing implementation failure, not an attack on AES's mathematics or every AES application.
Sources
- primary disclosureVendor advisory: Native AES packet cipher returns the raw AES key on an aliasBouncy Castle, github.com
- primary disclosureCVE-2026-71883 vendor CNA recordBouncy Castle CNA, cveawg.mitre.org
- primary disclosureBouncy Castle Java LTS 2.73.13 release notesBouncy Castle, bouncycastle.org