Impact
Bouncy Castle for Java LTS before 2.73.13 contains native AES packet ciphers that incorrectly release key, IV, and additional authenticated data arrays back into Java memory using JNI's ReleaseByteArrayElements in mode 0. This commits the native copy into the Java array, and when the caller passes the same array for input and output—common when encrypting in place over a key array—the released key bytes overwrite the ciphertext that had just been produced. This vulnerability is a CWE-200 information exposure flaw and consequently the caller receives the raw AES key instead of ciphertext, exposing cryptographic keys or causing unintended transmission of keys in place of secret data.
Affected Systems
Legion of the Bouncy Castle Inc. products featuring the bc-LTS-JAVA module, specifically versions prior to 2.73.13.
Risk and Exploitability
The CVSS score of 8.2 indicates high severity, and the vulnerability is not listed in CISA's KEV catalog. The exploit path relies on developers using native packet ciphers with overlapping input and output arrays; it does not provide remote code execution or privilege escalation. The vulnerability is straightforward to exploit for an application that encrypts in place over its own key array, leading to significant confidentiality risk for applications using this library.
OpenCVE Enrichment