Sceawere
Vulnerability Detail
CVE-2026-63311UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
NLTK SSRF Validation Bypass Vulnerability
Vulnerability Metadata
- Severity
- Medium
- Score / CVSS
- 5.3
- Creation Date
- 4h ago
- Vendor
- nltk
- Product
- nltk
- Attack Type
- Server-Side Request Forgery (SSRF)
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Attack Complexity
- LOW
Narrative and Response
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).
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "5.3",
"pubDate": "2026-08-22T15:16:19.233Z",
"pubdate": "2026-08-22T15:16:19.233Z",
"executiveSummary": "A server-side request forgery (SSRF) vulnerability exists in the NLTK package in versions <= 3.9.4 and before 3.10.0. The vulnerability resides within the validate_network_url() function located in nltk/pathsec.py.\nThe flaw allows attackers to bypass security restrictions and reach restricted internal network resources, including sensitive cloud metadata endpoints such as 169.254.169.254.\nThe risk implications are severe, as successful exploitation permits unauthorized access to internal infrastructure or metadata services that may expose sensitive credentials and configuration data.\nAttacker capabilities involve the ability to trigger DNS resolution failures or orchestrate DNS rebinding attacks against applications utilizing the affected NLTK validation mechanisms.\nNo specific authentication or privilege requirements are mentioned in the input, but the attack relies on exploiting the network validation logic during URL handling via urlopen().",
"technicalDetails": "The root cause of the vulnerability stems from flawed exception handling and control flow logic within the _resolve_hostname() helper function inside nltk/pathsec.py.\nDuring the execution of socket.getaddrinfo(), the helper function catches both OSError and ValueError exceptions and incorrectly returns an empty list instead of signaling a resolution failure or enforcing a fail-closed posture.\nConsequently, when DNS resolution fails or is manipulated, the subsequent validation loop executes zero IP checks against the target destination.\nBecause no IP checks are performed, the validate_network_url() function fails open, allowing the downstream urlopen() mechanism to proceed with the network request completely devoid of security validation.\nAn attacker exploits this behavior by triggering forced DNS resolution failures or employing DNS rebinding techniques to force the application into the fail-open state.\nStep-by-step, the attack flow proceeds as follows: First, the attacker supplies a maliciously crafted URL or manipulates DNS states to induce an exception during socket.getaddrinfo(). Second, the _resolve_hostname() helper catches the OSError or ValueError and returns an empty list. Third, the validation loop bypasses all IP-based blocklists and restrictions due to the lack of entries to evaluate. Fourth, validate_network_url() permits the connection, allowing urlopen() to query restricted internal resources or cloud metadata endpoints like 169.254.169.254.\nThe affected component is the validation logic within nltk/pathsec.py, specifically affecting NLTK versions <= 3.9.4 and prior to 3.10.0.\nPost-exploitation impact includes unauthorized retrieval of cloud instance metadata, internal service enumeration, and potential lateral movement or data exfiltration within the hosting environment."
}