CVE-2026-57082 Details
Description
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 _random_pad, 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.
A vulnerability exists in Net::BitTorrent versions through 2.0.1 for Perl, where the MSE (Message Stream Encryption) handshake improperly generates the Diffie-Hellman private key using a non-cryptographic pseudorandom number generator (PRNG). This PRNG, Perl's rand(), is predictable and seeded once per process, leading to a shared secret and RC4 keys that can be easily derived by an observer. The vulnerability allows for passive decryption of the connection, undermining the obfuscation that MSE is designed to provide.
The private key generation should be changed to use a cryptographic source, such as Crypt::URandom, Crypt::SysRandom, or Crypt::PRNG, instead of the non-cryptographic rand().
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 30, 2026CISA-ADP
Assessed Jun 30, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-g444-x2c5-94hc | CPANSec | AdvisoryVendor |
| https://metacpan.org/release/SANKO/Net-BitTorrent-v2.1.0/changes | CPANSec |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-330 | Use of Insufficiently Random Values | CPANSec |
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| Net::BitTorrent | <= v2.0.1 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jul 20, 2026 | CVE Modified | CPANSec |
| Jun 30, 2026 | CVE Modified | CISA-ADP |
| Jun 30, 2026 | New CVE Received | CPANSec |
Volerion