CVE-2026-57082: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in SANKO Net::BitTorrent
Net::BitTorrent versions up to 2.0.1 for Perl use a non-cryptographic pseudo-random number generator (PRNG) to generate the MSE Diffie-Hellman private key. This weak PRNG allows a passive observer to recover the PRNG state from cleartext padding sent during the handshake, reconstruct the private key, derive the shared secret and RC4 keys, and decrypt the connection. This defeats the intended obfuscation provided by the MSE handshake.
AI Analysis
Technical Summary
Net::BitTorrent versions through 2.0.1 for Perl generate the MSE Diffie-Hellman private key using Perl's rand(), a non-cryptographic drand48-class PRNG seeded once per process. The handshake sends cleartext random padding derived from the same PRNG sequence, enabling a passive observer to recover the PRNG state, reconstruct the private key, compute the shared secret from the peer's public key, derive the RC4 keys, and decrypt the connection. This vulnerability arises from the use of a cryptographically weak PRNG (CWE-338) and results in the compromise of the MSE handshake confidentiality.
Potential Impact
An attacker who passively observes the MSE handshake can recover the PRNG state and reconstruct the Diffie-Hellman private key, allowing them to compute the shared secret and derive the RC4 encryption keys. This enables decryption of the encrypted connection, defeating the confidentiality protections of the MSE handshake.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Users should monitor for vendor updates addressing the use of a cryptographically secure PRNG for key generation in Net::BitTorrent.
CVE-2026-57082: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in SANKO Net::BitTorrent
Description
Net::BitTorrent versions up to 2.0.1 for Perl use a non-cryptographic pseudo-random number generator (PRNG) to generate the MSE Diffie-Hellman private key. This weak PRNG allows a passive observer to recover the PRNG state from cleartext padding sent during the handshake, reconstruct the private key, derive the shared secret and RC4 keys, and decrypt the connection. This defeats the intended obfuscation provided by the MSE handshake.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Net::BitTorrent versions through 2.0.1 for Perl generate the MSE Diffie-Hellman private key using Perl's rand(), a non-cryptographic drand48-class PRNG seeded once per process. The handshake sends cleartext random padding derived from the same PRNG sequence, enabling a passive observer to recover the PRNG state, reconstruct the private key, compute the shared secret from the peer's public key, derive the RC4 keys, and decrypt the connection. This vulnerability arises from the use of a cryptographically weak PRNG (CWE-338) and results in the compromise of the MSE handshake confidentiality.
Potential Impact
An attacker who passively observes the MSE handshake can recover the PRNG state and reconstruct the Diffie-Hellman private key, allowing them to compute the shared secret and derive the RC4 encryption keys. This enables decryption of the encrypted connection, defeating the confidentiality protections of the MSE handshake.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Users should monitor for vendor updates addressing the use of a cryptographically secure PRNG for key generation in Net::BitTorrent.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-23T18:20:33.514Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a43adde27e9c79719af49c1
Added to database: 06/30/2026, 11:51:58 UTC
Last enriched: 06/30/2026, 12:06:44 UTC
Last updated: 06/30/2026, 12:06:44 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.