CVE-2026-12372

Server-Side Request Forgery (SSRF) in nltk/nltk

Published Aug 9, 2026 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

A server‑side request forgery vulnerability is present in the network‑loading helper of the nltk library. The validate_network_url function, designed to prevent internal network requests, fails to reject IP addresses in the RFC 6598 shared address space (100.64.0.0/10). An attacker who can supply a URL that bypasses the helper can force the application to issue outbound requests to hosts in the shared‑address range, potentially leaking information about internal infrastructure. No code execution or privilege escalation is claimed; the impact is limited to confidentiality exposure through SSRF.

Affected Systems

The vulnerability affects all installations of the nltk library built from source when the validate_network_url function is invoked. Specifically, versions 3.9.4 and the current development branch are impacted. The flaw lies in the library’s internal validation logic, which is vendor‑specific to nltk/nltk.

Risk and Exploitability

The CVSS score of 3.7 indicates a low‑to‑moderate severity. EPSS data is unavailable and the issue is not listed in KEV, so widespread exploitation is not currently documented. The likely attack vector requires the attacker to influence a URL that is passed to nltk’s network‑loading helpers, a scenario that would arise in applications that fetch resources based on user input. No authentication or privilege escalation is required, but the exposure of internal hosts could facilitate further attacks such as credential harvesting or pivoting within the network.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a release of nltk in which validate_network_url correctly handles RFC 6598 addresses, if such a release is available.
  • Add an additional layer of URL validation in the application code to explicitly reject the 100.64.0.0/10 address space and other private ranges before calling nltk network helpers.
  • Configure network policy or firewall rules to block outbound traffic from the application server to IP ranges in the shared address space, thereby limiting the attacker’s reach in the event of an SSRF exploitation.

Generated by OpenCVE AI on August 10, 2026 at 00:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2jhm-w3mp-jcwr NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts
History
Type Values Removed Values Added
First Time appeared Nltk nltk
CPEs cpe:2.3:a:nltk:nltk:3.9.4:*:*:*:*:*:*:*
Vendors & Products Nltk nltk
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Nltk
Nltk nltk/nltk
Vendors & Products Nltk
Nltk nltk/nltk
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N'}

threat_severity

Low

Type Values Removed Values Added
Description 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.
Title Server-Side Request Forgery (SSRF) in nltk/nltk
Weaknesses CWE-918
References
Metrics cvssV3_0

{'score': 3.7, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Aug 12, 2026, 5:48 PM
Reserved
Jun 16, 2026, 6:05 AM
Status
Analyzed
Published
Aug 9, 2026, 11:16 PM
Modified
Oct 23, 2026, 8:10 PM
Severity
Low
Public date
Aug 9, 2026, 10:45 PM