CVE-2026-12372: NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts

CVE-2026-12372 · Severity: low · CVSS 3.7 · Published 2026-08-09

A Server-Side Request Forgery (SSRF) vulnerability exists in nltk/nltk versions 3.9.4 and the current develop branch. The `nltk.pathsec.validate_network_url()` function, intended to prevent SSRF by rejecting internal network addresses, fails to reject IPs in the RFC 6598 shared address space (`100.64.0.0/10`). This occurs because Python's `ipaddress` module does not classify such addresses as `is_private` or `is_global`, and the current guard only checks `is_private` and a few explicit categories. An attacker who can influence a URL passed to NLTK's network-loading helpers can exploit this vulnerability to make a strict-mode application send requests to shared-address-space hosts, potentially exposing non-public infrastructure reachable from the application host. The impact is limited to SSRF-style confidentiality exposure, with no code execution claimed.

Technologies: Nltk, nltk (PyPI). Vendors: Nltk, PyPI.

Quick answers

Is CVE-2026-12372 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-12372 being exploited in the wild.
How severe is CVE-2026-12372?
Low severity, with a CVSS score of 3.7, published 9 August 2026.
Which products and versions are affected?
nltk (PyPI) < 3.10.0, ECOSYSTEM:introduced=0,fixed=3.10.0, ECOSYSTEM:introduced=0,last_affected=3.9.4.
Is there a fix for CVE-2026-12372?
Yes. nltk (PyPI): upgrade to 3.10.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2026-12372?
Check whether you run Nltk or nltk (PyPI) 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.

How to fix

  • nltk (PyPI): upgrade to 3.10.0 or later
    pip install "nltk>=3.10.0"

Affected products

  • Nltk
  • nltk (PyPI) < 3.10.0, ECOSYSTEM:introduced=0,fixed=3.10.0, ECOSYSTEM:introduced=0,last_affected=3.9.4

Identifiers

  • CVE-2026-12372
  • GHSA-2jhm-w3mp-jcwr
  • PYSEC-2026-3955

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