CVE-2014-9742 in Botaninfo

Summary

by MITRE

The Miller-Rabin primality check in Botan before 1.10.8 and 1.11.x before 1.11.9 improperly uses a single random base, which makes it easier for remote attackers to defeat cryptographic protection mechanisms via a DH group.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/25/2018

The vulnerability described in CVE-2014-9742 represents a critical weakness in the cryptographic implementation of the Botan library, specifically affecting versions prior to 1.10.8 and 1.11.9. This issue resides in the Miller-Rabin primality testing algorithm, which serves as a fundamental component in generating and validating cryptographic keys, particularly within Diffie-Hellman key exchange mechanisms. The flaw fundamentally undermines the security assurances that cryptographic systems rely upon by introducing a predictable element into what should be a randomized process.

The technical flaw stems from the improper implementation of the Miller-Rabin primality test where the system uses only a single random base for testing rather than employing multiple independent random bases as recommended in cryptographic best practices. This single base approach creates a deterministic vulnerability that allows attackers to craft specific inputs that can bypass the primality verification process. The weakness becomes particularly dangerous when applied to Diffie-Hellman key exchange groups, where the security of the entire cryptographic protocol depends on the proper generation of large prime numbers. This vulnerability falls under the CWE-330 category of using insufficiently random values, which directly relates to the improper randomization of the primality testing process.

The operational impact of this vulnerability extends far beyond simple cryptographic weakness, as it enables remote attackers to systematically defeat cryptographic protections in systems relying on Botan. When an attacker can predict or manipulate the primality testing results, they gain the ability to compromise the Diffie-Hellman groups used in secure communications, potentially leading to man-in-the-middle attacks, key recovery, and complete breakdown of the encrypted communication channels. The vulnerability aligns with ATT&CK technique T1583.001 for developing capabilities and T1595.001 for network boundary compromise, as it provides attackers with a method to weaken cryptographic defenses and gain unauthorized access to secure systems.

The implications of this vulnerability are particularly severe given that the Miller-Rabin test is widely used in cryptographic libraries for generating secure prime numbers. When implemented incorrectly with a single random base, the mathematical properties that make this test effective for cryptographic purposes are significantly weakened. This flaw creates a scenario where an attacker can potentially construct weak Diffie-Hellman groups that are more susceptible to factorization attacks or other mathematical approaches that would normally be computationally infeasible. The vulnerability demonstrates a critical failure in cryptographic implementation standards where proper randomization is essential for maintaining security guarantees. Organizations using affected versions of Botan should immediately implement patches to ensure that the primality testing algorithm uses multiple independent random bases, thereby restoring the intended cryptographic security properties and protecting against the specific attack vectors that exploit this weakness.

Reservation

08/04/2015

Disclosure

05/13/2016

Moderation

accepted

Entry

VDB-87359

CPE

ready

EPSS

0.01430

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!