Live › vulnerability › CVE-2026-63311
Go to dashboardNLTK 3.9.4 and earlier skip the private-address check in validate_network_url() when DNS lookup fails, so the request still goes out. An attacker who can make an application fetch a URL can reach internal services such as cloud metadata endpoints.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-27 08:02 UTC, 0h before NVD. All times on this page are UTC.
Applications that pass user-influenced URLs into NLTK's network-URL code path are exposed, since the validation is what blocks internal addresses. Systems that only use NLTK with local data or fixed URLs are unlikely to be affected. Hosts running in cloud environments with metadata endpoints raise the stakes.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| nltk | pypi | <= 3.9.4 | 3.10.0 |
| nltk | vendor | < 3.10.0 | 3.10.0 |
pip show nltk and check whether the version is 3.9.4 or earlier.nltk to 3.10.0.Each row is the first time that source carried this signal. The analyst’s rows are its own findings.
There is an SSRF vulnerability in NLTK 3.9.4's network URL validation. The validate_network_url() function in nltk/pathsec.py fails open when DNS resolution returns an error.
The _resolve_hostname() helper at lines 193-234 catches OSError and ValueError during socket.getaddrinfo() and returns an empty list []. When this happens, the validation loop in validate_network_url() iterates over nothing (for addr in resolved: ... never executes), with no else/fallback check. The function returns normally, and urlopen() proceeds to make the request without any IP validation.
This means:
PoC:
import nltk.pathsec
import unittest.mock
# Simulate DNS failure
with unittest.mock.patch('socket.getaddrinfo', side_effect=OSError('DNS unavailable')):
# This SHOULD raise but doesn't -- fails open
nltk.pathsec.validate_network_url('http://169.254.169.254/latest/meta-data/')
# Returns normally, allowing SSRF to cloud metadata
The correct behavior is fail-closed: if DNS resolution fails, the URL should be REJECTED (not allowed). The function should raise an exception or return a failure status when _resolve_hostname() returns an empty list.
This is distinct from CVE-2024-39705 (which addressed pickle deserialization) and CVE-2026-33236 (which addressed XML path traversal). This finding targets the newly-added pathsec.py security layer introduced to fix those earlier issues.
Suggested fix: Add an explicit check after _resolve_hostname() returns: if the result is empty, raise a SecurityError. Never allow a URL request to proceed when IP validation was impossible.
CVSS Note: The CVSS use SC:H (High subsequent confidentiality) because the advisory explicitly identifies cloud metadata endpoints (169.254.169.254) as an attack target. Access to AWS IMDS or GCP metadata exposes credentials or service account tokens, which constitutes High-impact disclosure on downstream systems. This justifies SC:H over NVD's SC:L.
This page as .md · .json · in your agent: get_signal("CVE-2026-63311")
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.