Description
NLTK before 3.10.0 (affected versions <= 3.9.4) contains a server-side request forgery (SSRF) vulnerability in the validate_network_url() function in nltk/pathsec.py. The _resolve_hostname() helper catches OSError and ValueError during socket.getaddrinfo() and returns an empty list; when DNS resolution fails, the validation loop executes no IP checks and the function fails open, allowing urlopen() to proceed without validation. An attacker who can trigger DNS resolution failures or use DNS rebinding can bypass SSRF protections and reach restricted network resources, including cloud metadata endpoints (e.g., 169.254.169.254).
Published: 2026-08-22
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The NLTK library before version 3.10.0 contains a server‑side request forgery flaw in the validate_network_url function. When DNS resolution fails, the function mistakenly skips IP validation and allows urlopen() to proceed unchecked. This flaw can be exploited by an attacker who supplies a malicious URL or induces a DNS failure, enabling access to internal or private network endpoints, including cloud metadata services such as 169.254.169.254, thereby compromising confidentiality and potentially integrity.

Affected Systems

The issue impacts NLTK releases from the nltk:nltk vendor, specifically any version up to and including 3.9.4. Systems that use the validate_network_url routine to process user‑supplied URLs are at risk.

Risk and Exploitability

The CVSS base score of 6.9 indicates moderate severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The exploitation requires the ability to trigger DNS resolution failure or DNS rebinding against NLTK’s internal validation logic. Based on the description, the likely attack vector is application‑level input that causes the library to fetch a URL whose hostname cannot be resolved, allowing the attacker to reach restricted network resources.

Generated by OpenCVE AI on August 22, 2026 at 15:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NLTK to version 3.10.0 or later, which removes the flawed validation path.
  • Add explicit input validation or a whitelist around calls to nltk.pathsec.validate_network_url to limit which URLs may be fetched.
  • Configure network controls (firewall or proxy) to restrict outbound connections from the application to internal addresses such as the 169.254.169.254 cloud metadata endpoint.

Generated by OpenCVE AI on August 22, 2026 at 15:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 14:30:00 +0000

Type Values Removed Values Added
Description NLTK before 3.10.0 (affected versions <= 3.9.4) contains a server-side request forgery (SSRF) vulnerability in the validate_network_url() function in nltk/pathsec.py. The _resolve_hostname() helper catches OSError and ValueError during socket.getaddrinfo() and returns an empty list; when DNS resolution fails, the validation loop executes no IP checks and the function fails open, allowing urlopen() to proceed without validation. An attacker who can trigger DNS resolution failures or use DNS rebinding can bypass SSRF protections and reach restricted network resources, including cloud metadata endpoints (e.g., 169.254.169.254).
Title NLTK before 3.10.0 SSRF via DNS Resolution Failure
First Time appeared Nltk
Nltk nltk
Weaknesses CWE-918
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk
Nltk nltk
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-22T14:12:40.063Z

Reserved: 2026-07-16T12:13:18.733Z

Link: CVE-2026-63311

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-22T15:16:19.233

Modified: 2026-08-22T15:16:19.233

Link: CVE-2026-63311

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T15:30:05Z

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)