CVE-2026-57082
Full vulnerability record from the local CVENow database.
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.
View original CVE JSON
{
"id": "CVE-2026-57082",
"sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"published": "2026-06-30T12:16:25.737",
"lastModified": "2026-10-25T21:10:00.770",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Net::BitTorrent versions before 2.1.0 for Perl generate the MSE Diffie-Hellman private key with a non-cryptographic PRNG.\n\nThe 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.\n\nA 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."
},
{
"lang": "es",
"value": "Las versiones de Net::BitTorrent hasta la 2.0.1 para Perl generan la clave privada Diffie-Hellman de MSE con un PRNG no criptográfico.\n\nEl handshake de MSE (Message Stream Encryption) deriva su clave privada Diffie-Hellman de 160 bits de la función rand() de Perl, un generador no criptográfico de clase drand48 inicializado una vez por proceso, en KeyExchange.pm. El secreto compartido y las claves RC4 derivadas de él (el SHA-1 de ’keyA’ o ’keyB’, el secreto compartido y el infohash) por lo tanto dependen completamente de un PRNG predecible. El mismo handshake envía, en texto claro, relleno aleatorio obtenido de la misma secuencia de rand() en _random_pad, inmediatamente después de la clave pública y la extracción de la clave privada.\n\nUn observador pasivo del handshake recupera el estado del PRNG del relleno en texto claro, reconstruye la clave privada, calcula el secreto compartido a partir de la clave pública del par en la red, deriva las claves RC4 y descifra la conexión, anulando la ofuscación por observación pasiva que proporciona MSE."
}
],
"affected": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"affectedData": [
{
"vendor": "SANKO",
"product": "Net::BitTorrent",
"defaultStatus": "unaffected",
"collectionURL": "https://cpan.org/modules",
"packageName": "Net-BitTorrent",
"programFiles": [
"lib/Net/BitTorrent/Protocol/MSE/KeyExchange.pm",
"lib/Net/BitTorrent/Protocol/MSE.pm",
"lib/Net/BitTorrent/Peer.pm"
],
"programRoutines": [
{
"name": "Net::BitTorrent::Protocol::MSE::_random_pad"
}
],
"repo": "https://github.com/sanko/Net-BitTorrent.pm",
"versions": [
{
"version": "0",
"lessThan": "2.1.0",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
"baseScore": 5.9,
"baseSeverity": "MEDIUM",
"attackVector": "NETWORK",
"attackComplexity": "HIGH",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 2.2,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-06-30T14:19:46.278267Z",
"id": "CVE-2026-57082",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-330"
},
{
"lang": "en",
"value": "CWE-338"
}
]
}
],
"references": [
{
"url": "https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-g444-x2c5-94hc",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://metacpan.org/release/SANKO/Net-BitTorrent-v2.1.0/changes",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
}
]
}