# CVE-2026-57081: SANKO Net::BitTorrent memory exhaustion via nested bencoded input

Source: https://junglewise.ai/threats/cve-2026-57081-sanko-net-bittorrent-memory-exhaustion-via-nested-bencoded-input  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-30. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-57081 · Severity: info · CVSS 7.5 · Published 2026-06-30

Net::BitTorrent is a Perl library used to build BitTorrent clients and tools. A vulnerability in how it processes data allows a remote attacker to crash the application by sending a specially crafted, small message. This can lead to a complete service outage (Denial of Service) for any software using this library when it interacts with malicious peers or files.

Technologies: [SANKO Net::BitTorrent](https://junglewise.ai/threats/technologies/net-bittorrent). Vendors: [SANKO](https://junglewise.ai/threats/vendors/sanko).

## Quick answers

**Is CVE-2026-57081 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-57081 being exploited in the wild.

**How severe is CVE-2026-57081?** Informational severity, with a CVSS score of 7.5, published 30 June 2026.

**Which products and versions are affected?** SANKO Net::BitTorrent <= 2.0.1.

**Is there a fix for CVE-2026-57081?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-57081 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-57081?** Check whether you run SANKO Net::BitTorrent at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The bdecode function in Net::BitTorrent::Protocol::BEP03::Bencode lacks a recursion depth limit and suffers from inefficient memory handling. Specifically, each recursive call for nested lists or dictionaries passes the remaining buffer by value, leading to O(N^2) memory consumption relative to the nesting depth. An attacker can provide a small input (approx. 150 KB) containing ~150,000 nested levels to trigger multi-gigabyte memory usage, resulting in a process crash via the OOM killer. This affects all untrusted bencode sources including .torrent files, DHT messages, and tracker responses. As of the advisory, no patch is available; mitigations include implementing a nesting depth cap.

## Affected products

- SANKO Net::BitTorrent <= 2.0.1

## Timeline

- 2026-06-28: advisory: Original GitHub security advisory published by maintainer
- 2026-06-30: disclosed: CVE-2026-57081 published to NVD

## References

- [https://cpan.org/modules](https://cpan.org/modules)
- [https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-mv44-v82p-89xv](https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-mv44-v82p-89xv)

## Related threats

- [SANKO Net::BitTorrent predictable PRNG in MSE handshake](https://junglewise.ai/threats/cve-2026-57082-sanko-net-bittorrent-predictable-prng-in-mse-handshake)
- [SANKO Net::BitTorrent memory exhaustion in peer-wire framing](https://junglewise.ai/threats/cve-2026-57080-sanko-net-bittorrent-memory-exhaustion-in-peer-wire-framing)
- [Net::BitTorrent path traversal in peer-supplied metadata](https://junglewise.ai/threats/cve-2026-57079-net-bittorrent-path-traversal-in-peer-supplied-metadata)
