Cloudanix VulnDB

CVE-2026-63311

Medium · 5.3

CVSS

5.3

EPSS

0.3%

Published

Aug 22, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in a popular text-processing library can let attackers reach internal systems that should be off-limits when the library tries to check web addresses.

Exploit Available Chainable
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
SSRF
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The validate_network_url() function in nltk/pathsec.py fails to perform IP validation when _resolve_hostname() returns an empty list after DNS resolution errors (OSError/ValueError from getaddrinfo), allowing urlopen() to connect to arbitrary targets including internal or metadata services.

Why it matters to the business

Attackers can reach internal network resources or cloud instance metadata that should be protected, potentially leading to data exposure or unauthorized access in environments using NLTK for URL handling.

How an attack unfolds

An attacker supplies a hostname that triggers DNS resolution failure or uses DNS rebinding techniques; the validation loop is skipped, the SSRF check fails open, and urlopen() proceeds to the attacker-controlled or restricted destination.

How to fix it

Upgrade NLTK to version 3.10.0 or later where the DNS failure handling and validation logic have been corrected; until then restrict untrusted URL inputs or wrap calls with additional network-level controls.

How to confirm the fix worked

Confirm NLTK version is 3.10.0 or newer; test that validate_network_url now correctly rejects or blocks attempts that previously bypassed checks due to resolution failures.

Typical attack path

  1. Identify an NLTK-based application that accepts or processes untrusted URLs via validate_network_url
  2. Craft a URL whose DNS resolution fails or rebinds to an internal target such as 169.254.169.254
  3. Trigger the vulnerable code path so that the empty-list return bypasses all IP checks
  4. Reach restricted resources that would normally be blocked by the SSRF protection

How to detect it

Review application logs for NLTK URL validation calls that result in connections to unexpected internal IPs or metadata endpoints; look for patterns of DNS failures followed by successful outbound connections from the NLTK process.

What your security team should do

  • Inventory all deployments and dependencies that include NLTK <= 3.9.4
  • Prioritize upgrade to 3.10.0 in any environment that processes external URLs
  • Add network egress controls or proxies to limit reachability of metadata endpoints as a compensating control
  • Monitor for new NLTK releases and update dependency manifests accordingly

The record

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).

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities