CVE-2016-1000338: Bouncy Castle JCE Provider Signature Validation Vulnerability
Summary
CVE-2016-1000338: In Bouncy Castle JCE Provider version 1.55 and earlier the DSA does not fully validate ASN.1 encoding of signature on verification. Affects org.bouncycastle:bcprov-jdk14 versions >= 1.38, < 1.56. Fixed in 1.56. How to fix ↓
Also tracked for
- bouncycastle · Debian:11
The same CVE-2016-1000338 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Bouncy Castle JCE Provider is a Java library that provides cryptographic services, including encryption, decryption, and digital signatures. It is widely used in various applications and frameworks for secure communication and data protection. The vulnerability identified as CVE-2016-1000338 affects versions 1.55 and earlier of the Bouncy Castle JCE Provider. This vulnerability allows an attacker to inject extra elements in the signature sequence, potentially compromising the integrity and authenticity of signed data.
Vulnerability Detail
The vulnerability arises from the incomplete validation of ASN.1 encoding of signatures during verification in the DSA (Digital Signature Algorithm) implementation of the Bouncy Castle JCE Provider. By injecting additional elements into the signature sequence, an attacker can manipulate the verification process and introduce 'invisible' data into a signed structure. This could lead to various security risks, such as unauthorized data modifications, impersonation attacks, or bypassing security controls that rely on the integrity of signed data.
How To Fix
Latest published version: 1.86 as of 22 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.56
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, if upgrading to the fixed version is not immediately feasible, developers can implement additional signature validation checks in their code to mitigate the risk of this vulnerability. This can involve verifying the structure and content of the signature sequence to ensure it does not contain any unexpected or malicious elements. However, this workaround is not recommended as it may introduce complexities and potential vulnerabilities if not implemented correctly.
Conclusion
The Bouncy Castle JCE Provider version 1.55 and earlier are vulnerable to a signature validation issue that allows the injection of extra elements in the signature sequence. This can compromise the integrity and authenticity of signed data, potentially leading to unauthorized modifications and impersonation attacks. To mitigate this vulnerability, it is crucial to upgrade to version 1.56 or later of the Bouncy Castle JCE Provider. For further assistance and support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.bouncycastle:bcprov-jdk14 →
FAQ
The vulnerability allows an attacker to manipulate the signature verification process and introduce 'invisible' data into a signed structure. This can lead to unauthorized data modifications, impersonation attacks, or bypassing security controls that rely on the integrity of signed data.
Versions 1.55 and earlier of the Bouncy Castle JCE Provider are affected by this vulnerability.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it in real-time and alert you if any open-source vulnerabilities, including this one, are detected.
Yes, a fix is available in version 1.56 or later of the Bouncy Castle JCE Provider. It is recommended to upgrade to the fixed version to mitigate the vulnerability.
While upgrading to the fixed version is the recommended solution, developers can implement additional signature validation checks in their code as a temporary workaround. However, this workaround is not foolproof and may introduce complexities and potential vulnerabilities if not implemented correctly.
Related vulnerabilities
Recent vulnerabilities recorded for org.bouncycastle:bcprov-jdk14.