← Back to CVE Explorer

CVE-2026-57079

Full vulnerability record from the local CVENow database.

Description

Net::BitTorrent versions before 2.1.0 for Perl write files outside the download directory via path traversal in peer-supplied metadata. Net::BitTorrent validates file path components only on the .torrent-file ingest path. The peer and magnet metadata path (_on_metadata_received, reached from the BEP09 ut_metadata extension) passes attacker-supplied file names straight to Storage::add_file and Storage::_parse_file_tree, where Path::Tiny's child() does not collapse "..". A v2 file tree key, a v1 files[].path element, or a single-file name containing ".." segments therefore resolves outside the download directory. Because the peer also controls the piece hashes and the served bytes, content verification passes, so a malicious magnet or peer writes attacker-chosen content to an attacker-chosen path on the downloading host.

Severity
MEDIUM
CVSS score
5.3 (v3.1)
Vulnerability status
Deferred
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-06-30 12:16:25.427000
Last modified
2026-10-25 21:10:00.770000
View original CVE JSON
{
  "id": "CVE-2026-57079",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-06-30T12:16:25.427",
  "lastModified": "2026-10-25T21:10:00.770",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Net::BitTorrent versions before 2.1.0 for Perl write files outside the download directory via path traversal in peer-supplied metadata.\n\nNet::BitTorrent validates file path components only on the .torrent-file ingest path. The peer and magnet metadata path (_on_metadata_received, reached from the BEP09 ut_metadata extension) passes attacker-supplied file names straight to Storage::add_file and Storage::_parse_file_tree, where Path::Tiny's child() does not collapse \"..\". A v2 file tree key, a v1 files[].path element, or a single-file name containing \"..\" segments therefore resolves outside the download directory.\n\nBecause the peer also controls the piece hashes and the served bytes, content verification passes, so a malicious magnet or peer writes attacker-chosen content to an attacker-chosen path on the downloading host."
    },
    {
      "lang": "es",
      "value": "Las versiones de Net::BitTorrent hasta la 2.0.1 para Perl escriben archivos fuera del directorio de descarga mediante salto de ruta en metadatos proporcionados por pares.\n\nNet::BitTorrent valida los componentes de la ruta de archivo solo en la ruta de ingesta del archivo .torrent. La ruta de metadatos de pares y magnet (_on_metadata_received, alcanzada desde la extensión BEP09 ut_metadata) pasa nombres de archivo proporcionados por el atacante directamente a Storage::add_file y Storage::_parse_file_tree, donde child() de Path::Tiny no colapsa ’..’. Una clave de árbol de archivos v2, un elemento files[].path de v1, o un nombre de archivo único que contenga segmentos ’..’ por lo tanto se resuelve fuera del directorio de descarga.\n\nDebido a que el par también controla los hashes de las piezas y los bytes servidos, la verificación de contenido pasa, por lo que un magnet o par malicioso escribe contenido elegido por el atacante a una ruta elegida por el atacante en el host de descarga."
    }
  ],
  "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/Torrent.pm",
            "lib/Net/BitTorrent/Storage.pm",
            "lib/Net/BitTorrent/Storage/File.pm"
          ],
          "programRoutines": [
            {
              "name": "Net::BitTorrent::Torrent::_on_metadata_received"
            },
            {
              "name": "Net::BitTorrent::Storage::add_file"
            },
            {
              "name": "Net::BitTorrent::Storage::_parse_file_tree"
            }
          ],
          "repo": "https://github.com/sanko/Net-BitTorrent.pm",
          "versions": [
            {
              "version": "0",
              "lessThan": "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:L/I:N/A:N",
          "baseScore": 5.3,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "NONE",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 1.4
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-30T13:52:00.535187Z",
          "id": "CVE-2026-57079",
          "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-22"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/sanko/Net-BitTorrent.pm/security/advisories/GHSA-5wc6-r65f-62rr",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://metacpan.org/release/SANKO/Net-BitTorrent-v2.1.0/changes",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    }
  ]
}