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

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. 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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.