---
id: CVE-2026-57080
title: >-
  Net::BitTorrent versions through 2.1.0 for Perl allow remote memory exhaustion
  via an uncapped peer-wire message-length prefix.


  The peer-wire framing in _process_messages trusts the 4-byte length prefix
  sent by a connected peer with no …
summary: >-
  Net::BitTorrent versions through 2.1.0 for Perl allow remote memory exhaustion
  via an uncapped peer-wire message-length prefix.


  The peer-wire framing in _process_messages trusts the 4-byte length prefix
  sent by a connected peer with no …
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-400
  - CWE-770
published: '2026-06-30'
updated: '2026-07-20'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-57080'
references:
  - url: >-
      https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-7jr6-2jf4-6qc4
    label: 9b29abf9-4ab0-4765-b253-1875cd9b441e
  - url: 'https://metacpan.org/release/SANKO/Net-BitTorrent-v2.1.0/changes'
    label: 9b29abf9-4ab0-4765-b253-1875cd9b441e
tags:
  - nvd
epss: 0.00488
epssPercentile: 0.39333
ingestedAt: '2026-07-20T07:36:55.637Z'
---

## Overview

Net::BitTorrent versions through 2.1.0 for Perl allow remote memory exhaustion via an uncapped peer-wire message-length prefix.

The peer-wire framing in _process_messages trusts the 4-byte length prefix sent by a connected peer with no upper bound, while receive_data appends every inbound byte to the input buffer. A peer announces a length prefix of up to about 4 GiB and then streams bytes; the decoder waits until the buffer holds the full message before processing it, so the buffer grows without limit.

Peer connections are unauthenticated, so any peer in the swarm exhausts the downloading process's memory. The largest legitimate message is a 16 KiB piece block, so any announced length far above that is anomalous.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
