CVE-2026-57082 Weak cryptography in Net::BitTorrent
A passive attacker can decrypt BitTorrent traffic by predicting the Diffie-Hellman private key generated via a non-cryptographic PRNG in the Net::BitTorrent Perl library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-57082?
CVE-2026-57082 is a medium-severity vulnerability in SANKO Net::BitTorrent, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-57082?
How do I fix CVE-2026-57082?
No fix has been published for CVE-2026-57082 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-57082 being exploited?
There is no known exploitation of CVE-2026-57082 in the wild and no public exploit code.
Sources
Also known as GHSA-3x8p-9jc8-598w, GHSA-g444-x2c5-94hc.