← Back to CVE Explorer

CVE-2026-57081

Full vulnerability record from the local CVENow database.

Description

Net::BitTorrent versions through 2.1.0 for Perl allow remote memory exhaustion via deeply nested bencoded input. bdecode recurses once per nested list or dictionary level with no depth cap, and each recursive call receives the remaining buffer by value while the list and dictionary branches capture the whole remainder, so every live recursion frame keeps its own copy of the shrinking buffer (O(N^2) bytes for an N-deep input). The decoder runs on every untrusted bencode source: .torrent files, BEP09 metadata fetched from peers, DHT messages, and tracker responses. A bencoded input of roughly 150,000 nested lists (about 150 KB on the wire) drives multi-gigabyte peak memory, so one short message from any peer, or one crafted .torrent file or magnet link, terminates the client.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Deferred
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-06-30 12:16:25.633000
Last modified
2026-10-25 21:10:00.770000
View original CVE JSON
{
  "id": "CVE-2026-57081",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-06-30T12:16:25.633",
  "lastModified": "2026-10-25T21:10:00.770",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Net::BitTorrent versions through 2.1.0 for Perl allow remote memory exhaustion via deeply nested bencoded input.\n\nbdecode recurses once per nested list or dictionary level with no depth cap, and each recursive call receives the remaining buffer by value while the list and dictionary branches capture the whole remainder, so every live recursion frame keeps its own copy of the shrinking buffer (O(N^2) bytes for an N-deep input). The decoder runs on every untrusted bencode source: .torrent files, BEP09 metadata fetched from peers, DHT messages, and tracker responses.\n\nA bencoded input of roughly 150,000 nested lists (about 150 KB on the wire) drives multi-gigabyte peak memory, so one short message from any peer, or one crafted .torrent file or magnet link, terminates the client."
    },
    {
      "lang": "es",
      "value": "Las versiones de Net::BitTorrent hasta la 2.0.1 para Perl permiten el agotamiento remoto de la memoria a través de una entrada bencoded profundamente anidada.\n\nbdecode recurre una vez por cada nivel de lista o diccionario anidado sin límite de profundidad, y cada llamada recursiva recibe el búfer restante por valor mientras que las ramas de lista y diccionario capturan el resto completo, por lo que cada marco de recursión activo mantiene su propia copia del búfer que se reduce (O(N^2) bytes para una entrada de N niveles de profundidad). El decodificador se ejecuta en cada fuente bencode no confiable: archivos .torrent, metadatos BEP09 obtenidos de pares, mensajes DHT y respuestas de rastreadores.\n\nUna entrada bencoded de aproximadamente 150.000 listas anidadas (aproximadamente 150 KB en la red) provoca un pico de memoria de varios gigabytes, por lo que un mensaje corto de cualquier par, o un archivo .torrent o enlace magnet manipulado, termina el cliente."
    }
  ],
  "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/BEP03/Bencode.pm"
          ],
          "programRoutines": [
            {
              "name": "Net::BitTorrent::Protocol::BEP03::Bencode::bdecode"
            }
          ],
          "repo": "https://github.com/sanko/Net-BitTorrent.pm",
          "versions": [
            {
              "version": "0",
              "lessThanOrEqual": "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:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-30T15:04:09.539220Z",
          "id": "CVE-2026-57081",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-400"
        },
        {
          "lang": "en",
          "value": "CWE-674"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-mv44-v82p-89xv",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://metacpan.org/release/SANKO/Net-BitTorrent-v2.1.0/changes",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    }
  ]
}