CVE-2026-57082: Net::BitTorrent versions before 2.1.0 for Perl generate the MSE Diffie-Hellman private key with a non-cryptographic PRNG
Net::BitTorrent versions before 2.1.0 for Perl generate the MSE Diffie-Hellman private key with a non-cryptographic PRNG.
The MSE (Message Stream Encryption) handshake derives its 160-bit Diffie-Hellman private key from Perl's rand(), a non-cryptographic drand48-class generator seeded once per process, in KeyExchange.pm. The shared secret and the RC4 keys derived from it (the SHA-1 of "keyA" or "keyB", the shared secret, and the infohash) therefore depend entirely on a predictable PRNG. The same handshake sends, in cleartext, random padding drawn from the same rand() sequence in randompad, immediately after the public key and the private-key draw.
A passive observer of the handshake recovers the PRNG state from the cleartext padding, reconstructs the private key, computes the shared secret from the peer's public key on the wire, derives the RC4 keys, and decrypts the connection, defeating the passive-observation obfuscation MSE provides.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Net::BitTorrent (Net::BitTornt) for Perlto a version that resolves this vulnerability.Fixed in 2.1.0 - Compensating control
Mitigate passive decryption risks by treating Message Stream Encryption (MSE) handshakes as vulnerable to passive observers until upgraded (e.g., reduce exposure of encrypted traffic to untrusted networks) for Net::BitTorrent Perl versions affected by CVE-2026-57079 through CVE-2026-57082.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-57082?
CVE-2026-57082 has a medium severity rating of 5.9.
How do I fix CVE-2026-57082?
To fix CVE-2026-57082, update to Net::BitTorrent version 2.0.2 or later where the issue is resolved.
What is the risk associated with CVE-2026-57082?
The risk associated with CVE-2026-57082 stems from the use of a non-cryptographic PRNG to generate the MSE Diffie-Hellman private key, making it vulnerable to attacks.
What types of attacks can exploit CVE-2026-57082?
CVE-2026-57082 can potentially be exploited by attackers who can predict the generated keys due to the weak RNG.
Is my system affected by CVE-2026-57082?
If you are using Net::BitTorrent versions up to 2.0.1, your system is affected by CVE-2026-57082.