Media

NLTK: Downloader.download follows hardlinks and overwrites outside-root files

  • Publicada: 27.08.2026
  • Actualizado: 11.10.2026 15:18

Summary

NLTK's downloader now blocks symlink escapes during ZIP extraction, but it still treats pre-existing hardlinks inside the install tree as ordinary in-root files. A normal package install can therefore overwrite an outside-root inode through that hardlink.

Details

  • Vulnerability type: Filesystem containment bypass
  • Affected component: nltk.downloader.Downloader.download, nltk.downloader.Downloader.incr_download
  • Affected versions: Published 3.9.4 and current source v3.10.0-rc2 both reproduced for the extraction-stage overwrite.
  • Patched versions: 3.10.3
  • Root cause: The downloader validates traversal and symlink conditions but does not reject pre-existing hardlink aliases inside the install tree.

The install flow correctly rejects a pre-existing symlink at an extraction target, yet it accepts a pre-existing hardlink at the same path. When the package is installed, extracted member data is written through the hardlink and mutates the outside inode.

PoC

Preconditions

  • The attacker can plant files inside a writable shared downloader root on the same filesystem as the target file.

Steps

  1. Prepare a downloader root and create a hardlink inside it that points to an outside target file.
  2. Confirm a symlink at the same path is rejected as a negative control.
  3. Run a normal Downloader.download() package install whose extracted member lands on the hardlink path.
  4. Observe the outside target file is overwritten while the downloader still reports the package as installed.

Minimal reproducible excerpt

extract_hardlink_before ORIGINAL
extract_hardlink_after PWNED
extract_hardlink_status installed

Impact

A shared or attacker-influenced downloader directory can be turned into an overwrite primitive against same-filesystem files outside the intended install root.

Remediation

Treat pre-existing hardlinks as unsafe in extraction targets, verify that each write path stays within the intended install tree at the inode level, and add regression tests that pair hardlinks with existing symlink controls.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Python (PyPI) nltk < 3.10.3 3.10.3

Referencias

Puntuación CVSS 7.1/10
Vector CVSS
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Debilidad (CWE)
CWE-59, CWE-61, CWE-73
Plataforma
Python (PyPI)
Paquete
nltk
Publicada
27.08.2026
Actualizado
11.10.2026 15:18

Fuentes y licencias

OSV / GitHub Advisory Database - PYSEC-2026-3741 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-f794-5jv7-7672 - CC BY 4.0

Historial de vulnerabilidades: nltk

Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (52) en el archivo
Entradas en total
52
Primera → última
08.2019 09.2026
Sin corrección
6
Explotada en ataques
0

Distribución por gravedad

  • Crítica 5
  • Alta 32
  • Media 13
  • Baja 2

Divulgaciones por año

  1. 2019: 1
  2. 2020: 0
  3. 2021: 2
  4. 2022: 1
  5. 2023: 0
  6. 2024: 1
  7. 2025: 0
  8. 2026: 47
Gravedad:
  1. NLTK: Downloader.download follows hardlinks and overwrites outside-root files esta entrada
    Media · 7.1 CVE-2026-81727 < 3.10.3 3.10.3
  2. Alta · 7.0 CVE-2026-81726 <= 3.10.3 sin corrección
  3. Alta CVE-2026-79674 < 3.10.3 3.10.3
  4. Alta · 8.8 CVE-2026-71513 >= 3.10.0, < 3.10.3 3.10.3
  5. Alta · 5.9 CVE-2026-62385 < 3.10.0 3.10.0
Mostrar más (18) Mostrando 20 de 38

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.