Skip to main content

Net::BitTorrent CVE-2026-57082

| EUVDEUVD-2026-40291 MEDIUM
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) (CWE-338)
2026-06-30 CPANSec GHSA-3x8p-9jc8-598w
5.9
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attain passive vantage on network path
  2. Delivery
    Capture MSE DH handshake in transit
  3. Exploit
    Extract cleartext rand() padding bytes from handshake
  4. Install
    Reconstruct drand48 PRNG internal state
  5. C2
    Recompute 160-bit DH private key from recovered state
  6. Execute
    Derive RC4 keys via SHA-1 of shared secret and infohash
  7. Impact
    Decrypt MSE-encrypted BitTorrent stream

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Cryptographic PRNG selection
Exploitation Conditions

MSE must be enabled and actively used - it is the default encrypted connection mode in Net::BitTorrent, so default deployments are affected without any special configuration. The attacker must be passively positioned on the network path between the two peers to observe a complete MSE DH handshake, including both the DH public key and the immediately following cleartext random padding bytes from _random_pad in the same rand() sequence. No authentication, credentials, or active injection into the stream is required. Exploitation is strictly read-only - the flaw enables passive decryption but not stream manipulation. The attack does not apply if MSE is explicitly disabled (plaintext mode), since no RC4 encryption is then in use. The vulnerability does not affect confidentiality of content that was already transmitted in plaintext outside of MSE.

Impact

The CVSS 3.1 score of 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) accurately characterizes the attack as network-accessible but high-complexity, since successful exploitation requires a network-positioned passive observer who can capture a complete MSE handshake. Real-world risk is moderate: the math of the attack is entirely deterministic - private key recovery is not probabilistic but guaranteed once padding bytes are observed - yet operational preconditions (ISP-level or LAN-level vantage point) limit opportunistic mass exploitation. It is important to note that MSE was never designed as strong encryption, only as traffic obfuscation to avoid ISP throttling; however, this flaw allows an adversary to break even that limited privacy guarantee. No EPSS score was provided in the intelligence data. No CISA KEV listing exists, and no confirmed public exploit code was identified, suggesting exploitation remains theoretically straightforward but not yet commodity. CVSS signals and the vulnerability description are consistent - no conflicts to flag.

Exploit ScenarioDerived

An ISP-level passive observer or local network attacker captures the complete MSE DH handshake between a Net::BitTorrent ≤ 2.0.1 client and a remote peer, extracting the cleartext random padding bytes emitted by _random_pad. The observer feeds these bytes into a drand48 state-recovery tool, reconstructs the internal PRNG state, rewinds to derive the 160-bit DH private key, and computes the shared secret using the peer's public DH key already visible on the wire; the observer then derives the RC4 keystream and decrypts the full MSE-encrypted session. No active participation in the handshake is required.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 30, 2026

MSE Diffie-Hellman key exchange in Net::BitTorrent (Perl, all versions through 2.0.1) is rendered cryptographically transparent to passive network observers because Perl's non-cryptographic rand() function generates the 160-bit DH private key in KeyExchange.pm, and the same PRNG sequence simultaneously produces cleartext random padding transmitted during the same handshake. A passive eavesdropper who captures the handshake can recover the drand48 PRNG state from the observable padding bytes, reconstruct the private key, derive the RC4 session keys, and fully decrypt the MSE-encrypted stream - completely defeating the passive-observation obfuscation MSE is designed to provide. No public exploit has been identified at time of analysis, but the recovery is deterministic and requires only standard number theory once the handshake is captured.

RemediationAI

Consult the vendor GitHub Security Advisory at https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-g444-x2c5-94hc for the patched release version - no exact fixed version number was present in the provided intelligence, so that advisory must be used to confirm the minimum safe version before upgrading. The underlying fix must replace Perl's rand() in KeyExchange.pm with a cryptographically secure random source such as Crypt::URandom, Bytes::Random::Secure, or direct reads from /dev/urandom for all DH private key material and random padding. As an interim compensating control, operators who cannot upgrade immediately should note that MSE provides obfuscation only, not authenticated encryption; disabling MSE entirely and protecting BitTorrent traffic through a VPN or application-layer TLS tunnel eliminates this attack surface without degrading effective confidentiality, since MSE's confidentiality guarantee was already broken. Disabling MSE may affect interoperability with peers that require encrypted connections.

Affected VersionsENISA

Net::BitTorrent 0 ≤2.0.1

Affected Packages

euvd net_bittorrent no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Net::BitTorrent is a Perl implementation of the BitTorrent protocol. MSE (Message Stream Encryption, also called BitTorrent protocol encryption) uses a 160-bit Diffie-Hellman key exchange to establish a shared secret, from which RC4 stream cipher keys are derived as the SHA-1 hash of the literal strings 'keyA' or 'keyB', the shared secret, and the torrent infohash. The root cause (CWE-338: Use of Cryptographically Weak PRNG) is that KeyExchange.pm calls Perl's built-in rand(), a drand48-class linear congruential generator with a small internal state, seeded only once per process. Critically, the _random_pad function uses the identical rand() call sequence to produce the cleartext padding bytes sent immediately alongside the DH public key on the wire. Because rand() is a deterministic LCG, an observer who sees the padding bytes can fully reconstruct the generator state and therefore recover the private key that was drawn from the same sequence moments before. The affected CPE is cpe:2.3:a:sanko:net::bittorrent:*:*:*:*:*:*:*:*.

Know when Net gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

Passive network interception of handshake needed (AC:H, AV:N); no credentials required (PR:N); full RC4 session decryption possible (C:H); no write or disruption capability (I:N, A:N).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

3
CVSS changed
Jun 30, 2026 - 15:22 NVD
5.9 (MEDIUM)
CVE Published
Jun 30, 2026 - 11:05 cve.org
UNKNOWN (no severity yet)
CVE Published
Jun 30, 2026 - 11:05 cve.org
MEDIUM 5.9

DescriptionCVE.org

Net::BitTorrent versions through 2.0.1 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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Rare
niche Perl BitTorrent library, minimal enterprise deployment footprint
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Net

View all
CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2026-111497 CRITICAL POC
9.2 Oct 21

Remote code execution is possible in Node.js releases that bundle a vulnerable Brotli decoder: a malformed brotli-compre

CVE-2023-38180 HIGH
7.5 Aug 08

.NET and Visual Studio Denial of Service Vulnerability. Rated high severity (CVSS 7.5), this vulnerability is remotely e

CVE-2026-69439 HIGH POC
8.8 Sep 08

Heap-based buffer overflow (CWE-122) in Microsoft .NET and Visual Studio allows a network-based unauthenticated attacker

CVE-2026-71328 HIGH POC
8.8 Sep 08

Heap-based buffer overflow in Microsoft Visual Studio 2022 and 2026 enables network-delivered remote code execution when

CVE-2026-62886 HIGH POC
7.8 Aug 11

Privilege escalation in Microsoft .NET runtimes (8.0, 9.0, and 10.0) and Microsoft Visual Studio 2022 and 2026 results f

CVE-2026-62871 HIGH POC
7.8 Aug 11

Heap-based buffer overflow (CWE-122) in Microsoft .NET enables local code execution across all actively supported .NET r

CVE-2026-70354 HIGH POC
7.8 Aug 11

Local code execution via out-of-bounds write in Microsoft .NET allows an unauthenticated local attacker to achieve full

CVE-2026-62909 HIGH POC
7.8 Aug 11

Local privilege escalation in Microsoft .NET (versions 8.0, 9.0, and 10.0) and Microsoft Visual Studio 2022/2026 allows

CVE-2026-62901 HIGH POC
7.5 Aug 11

Denial-of-service in Microsoft .NET runtimes and Visual Studio allows unauthenticated remote attackers to crash or hang

CVE-2026-62897 HIGH POC
7.0 Aug 11

Integer overflow in Microsoft .NET Framework and modern .NET runtimes enables local code execution with full process com

CVE-2026-62898 HIGH POC
7.5 Aug 11

Use-after-free memory corruption in Microsoft's QUIC protocol implementation (MsQuic) exposes sensitive heap memory to u

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy