CVE-2026-58060: HSS public-key level count unbounded, enabling huge allocation on verify
(updated )
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips before 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). HSS/LMS parsing reads the level count from an encoded public key with no ceiling, then reads a second level count from the signature, validates it only against the attacker-supplied first value, and allocates an array of that size. RFC 8554 caps HSS depth at 8 but the check is applied only during key generation. An attacker supplying both public key and signature can force an allocation of roughly 17 GB on the verifier, reachable from untrusted SubjectPublicKeyInfo, the JCA LMS providers and CMS content verification.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-58060 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 →