CVE-2026-12817 in Bouncy Castle for Java
Summary
by MITRE • 08/03/2026
In Bouncy Castle for Java before 1.85, OpenPGP AEAD decryption skips final tag on chunk-aligned data. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bcpg-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 08/03/2026
The vulnerability in Bouncy Castle for Java versions prior to 1.85 represents a critical cryptographic flaw that affects OpenPGP AEAD decryption operations. This issue specifically impacts the handling of chunk-aligned data during the decryption process, where the final authentication tag verification is skipped. The vulnerability manifests when processing encrypted data that aligns perfectly with the chunk boundaries used by the encryption algorithm, creating a scenario where the integrity check mechanism fails to validate the complete ciphertext. This flaw allows for potential tampering of encrypted data without detection, undermining the fundamental security guarantees provided by authenticated encryption.
The technical nature of this vulnerability stems from improper implementation of the AEAD (Authenticated Encryption with Associated Data) decryption routine within the OpenPGP implementation. When data is processed in chunk-aligned segments, the cryptographic library fails to properly verify the final authentication tag that ensures the integrity and authenticity of the entire ciphertext. This represents a deviation from standard cryptographic practices where all authentication tags must be validated regardless of data alignment. The issue affects multiple Bouncy Castle variants including the standard Java implementation, the LTS versions, and the FIPS certified modules, indicating a widespread problem within the library's cryptographic processing pipeline. According to CWE classification, this vulnerability maps to CWE-310: Cryptographic Issues, specifically addressing weaknesses in authentication mechanisms.
The operational impact of this vulnerability is severe as it allows attackers to potentially modify encrypted data without detection, compromising both confidentiality and integrity assurances provided by OpenPGP encryption. An attacker could manipulate the final chunk of encrypted data, causing the decryption process to succeed while silently altering the underlying plaintext contents. This creates a false sense of security for users who believe their data remains intact and authentic. The vulnerability affects any system utilizing Bouncy Castle's OpenPGP AEAD functionality for encrypting sensitive information, particularly impacting applications handling financial data, personal communications, or confidential business documents. Organizations using affected versions face potential data breaches where malicious modifications go undetected during the decryption process.
Mitigation strategies should prioritize immediate upgrade to patched versions of Bouncy Castle libraries, specifically targeting version 1.85 for standard Java implementations and 2.73.12 for LTS versions, while ensuring proper validation of all FIPS certified module versions. System administrators should conduct comprehensive inventory checks to identify all applications utilizing affected Bouncy Castle components and implement immediate patching protocols. Additionally, organizations should consider implementing additional integrity verification mechanisms at application layers where possible, though this provides only partial protection against the underlying cryptographic flaw. The ATT&CK framework categorizes this vulnerability under T1552.003: Steal or Forge Authentication Certificates, as it undermines the authentication guarantees of encrypted communications. Regular security audits should verify that all cryptographic libraries are updated to versions that properly implement AEAD verification procedures, ensuring complete tag validation regardless of data alignment characteristics.