CVE-2026-13506: Lazy ASN.1 sequence forcing resets nesting-depth guard
(updated )
Affects Bouncy Castle for Java before 1.85. LazyEncodedSequence.force() parses the deferred SEQUENCE with a fresh nesting-depth counter instead of inheriting the parent’s remaining budget, and never decrements it. CRLs loaded through X509CRLHolder or the BC CertificateFactory hold revokedCertificates as an unforced lazy sequence, so a 40-50 KB DER CRL nesting around 10,000 SEQUENCEs recurses one frame per level on hashing, comparison or encoding. The resulting StackOverflowError is usually uncaught and kills the handling thread.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-13506 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →