Executive brief
Net::BitTorrent is a Perl library used to download and share files via the BitTorrent protocol. A security flaw allows a malicious peer to crash the application by sending a specially crafted message that forces the software to consume all available system memory. This results in a denial-of-service, stopping all active downloads and potentially affecting other services on the same system.
Technical details
A resource exhaustion vulnerability exists in Net::BitTorrent versions through 2.0.1. The '_process_messages' function in the BEP03.pm module trusts a 4-byte length prefix provided by a peer without enforcing an upper bound. An unauthenticated remote attacker can announce a message length of up to 4 GiB; the 'receive_data' function will then append all incoming bytes to the input buffer until the announced length is reached. Because the software waits for the full message before processing, the buffer grows until the process is terminated by the operating system's Out-Of-Memory (OOM) killer. As of the advisory date, no patch is available, and users are advised to manually implement a length check (e.g., 1 MiB) to reject anomalous messages.
Affected products
- SANKO Net::BitTorrent through 2.0.1
Timeline
- 2026-06-28: advisory: GitHub advisory GHSA-7jr6-2jf4-6qc4 published
- 2026-06-30: disclosed: NVD publication date