CVE-2026-107283 in async-http-client
Summary
by MITRE • 10/08/2026
The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and asynchronously process HTTP responses. Prior to 3.0.12 and 2.16.1, Realm.Builder generates the HTTP Digest client nonce with ThreadLocalRandom rather than a cryptographically secure random source. Digest relies on an unpredictable cnonce to resist chosen-plaintext and credential precomputation attacks, so an observer able to infer generator state can reduce the protection of the authentication exchange. This issue is fixed in versions 3.0.12 and 2.16.1.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 10/09/2026
The AsyncHttpClient library serves as a critical component for Java-based applications requiring efficient execution of HTTP requests and asynchronous processing of responses. Within this ecosystem, the Realm.Builder class facilitates the configuration of authentication realms, specifically handling mechanisms such as HTTP Digest Authentication. This mechanism relies on the generation of client nonces to ensure that each authentication exchange is unique and resistant to replay attacks. The integrity of this security model depends heavily on the unpredictability of these generated values, which act as a cryptographic salt to prevent attackers from precomputing credential hashes or executing chosen-plaintext attacks against the authentication stream.
A significant vulnerability was identified in versions of AsyncHttpClient prior to 3.0.12 and 2.16.1 regarding the generation of HTTP Digest client nonces. The implementation utilized ThreadLocalRandom as the source for random number generation instead of a cryptographically secure pseudo-random number generator such as SecureRandom. While ThreadLocalRandom is designed for high-performance concurrent applications, it operates on deterministic algorithms that are predictable if an observer can infer or deduce the internal state of the generator. This design choice introduces a critical weakness because HTTP Digest authentication requires nonces to be unpredictable to maintain security guarantees against active and passive network observers who might attempt to analyze traffic patterns or exploit known weaknesses in pseudo-random number generation sequences.
The operational impact of this flaw is substantial, as it undermines the core security properties of HTTP Digest Authentication. An attacker capable of observing previous nonce generations or inferring the state of ThreadLocalRandom can predict future nonces with high probability. This capability allows for credential precomputation attacks where an adversary builds rainbow tables or hash maps tailored to specific users and servers using predicted nonces. Furthermore, it facilitates chosen-plaintext attacks by allowing an attacker to manipulate authentication exchanges in ways that reveal sensitive information about the server's response patterns or user credentials. The reduction in entropy effectively turns a robust challenge-response mechanism into one vulnerable to offline cracking and session hijacking attempts if the underlying random number generator is compromised through state inference.
This vulnerability aligns with CWE-330, which describes the use of insufficiently random values, specifically highlighting failures when pseudo-random generators are used where cryptographic randomness is required. It also maps to MITRE ATT&CK technique T1557, Adversary-in-the-Middle, as an attacker could leverage this weakness to intercept and potentially decrypt or forge authentication traffic by predicting the nonces involved in the handshake process. The failure to utilize a cryptographically secure source represents a fundamental deviation from security best practices for handling sensitive cryptographic material such as session tokens and challenge-response values.
To mitigate this risk, organizations must upgrade AsyncHttpClient to version 3.0.12 or later, where the implementation has been corrected to employ a cryptographically secure random number generator for nonce creation. For systems unable to immediately update due to compatibility constraints, implementing an external wrapper that intercepts Realm.Builder calls and injects securely generated nonces can serve as a temporary workaround. Additionally, security teams should audit other areas of their codebase where ThreadLocalRandom or similar deterministic generators might be incorrectly applied in contexts requiring cryptographic unpredictability. Regular vulnerability scanning and dependency management reviews are essential to ensure that such misconfigurations do not persist in production environments, thereby maintaining the integrity of authentication protocols across all Java-based HTTP clients.