Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 93%

CVE-2026-57082: CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in SANKO Net::BitTorrent

0
Medium
VulnerabilityCVE-2026-57082cvecve-2026-57082cwe-338cwe-330
Published: 06/30/2026 (06/30/2026, 11:05:33 UTC)
Source: CVE Database V5
Vendor/Project: SANKO
Product: Net::BitTorrent

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.

CVSS v3.1

Score 5.9medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

GitHub Actionsmore threats →cve
Net-BitTorrent
pkg:github/Net-BitTorrent
Affected versions
<=2.0.1

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

AILast updated: 07/20/2026, 18:08:16 UTC

Technical Analysis

Net::BitTorrent versions <=2.0.1 use Perl's rand(), a non-cryptographic drand48-class PRNG seeded once per process, to generate the 160-bit Diffie-Hellman private key for the MSE handshake in KeyExchange.pm. The handshake also sends random padding derived from the same PRNG in cleartext immediately after the public key and private key draw. An attacker passively observing the handshake can recover the PRNG state from the cleartext padding, reconstruct the private key, compute the shared secret using the peer's public key, derive the RC4 encryption keys, and decrypt the connection. This defeats the intended obfuscation provided by MSE and exposes the encrypted communication to passive interception.

Potential Impact

Confidentiality of the MSE-encrypted BitTorrent connection is compromised. An attacker who passively observes the handshake can decrypt the encrypted traffic by reconstructing the private key and shared secret. There is no impact on integrity or availability reported. The vulnerability allows passive decryption of the connection, undermining the privacy protections of MSE.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Users should upgrade to Net::BitTorrent version 2.1.0 or later, where this issue is resolved. Until then, avoid using affected versions (<=2.0.1) in environments where confidentiality of BitTorrent traffic is required.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 07/20/2026, 18:08:16 UTC

Last updated: 08/13/2026, 03:36:20 UTC

Views: 79

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses