Skip to main content

NLTK CVE-2026-63311

| EUVDEUVD-2026-64334 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-08-22 VulnCheck GHSA-3gqm-fcw5-w839 GHSA-qg9p-xrhj-435m PYSEC-2026-3723
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted hostname URL to NLTK-consuming application
  2. Delivery
    Engineer DNS resolution failure (NXDOMAIN or OSError) for that hostname
  3. Exploit
    _resolve_hostname() returns empty list, validation loop runs zero iterations
  4. Execution
    validate_network_url() exits without blocking, urlopen() executes
  5. Persist
    DNS rebinding or redirect routes request to 169.254.169.254
  6. Impact
    Retrieve cloud instance metadata and IAM credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all three of the following: (1) the target application must invoke NLTK's validate_network_url() function or a higher-level NLTK function that calls it, with a URL value that the attacker can influence - NLTK itself is a library and does not expose a network service, so the application's exposure surface determines whether this condition is met; (2) the attacker must be able to engineer a DNS resolution failure for the supplied hostname (e.g., by supplying a domain returning NXDOMAIN, or controlling DNS to produce an OSError or ValueError from socket.getaddrinfo()) or execute a DNS rebinding attack where a domain resolves to a permitted public IP during validation but to a restricted internal IP at request time; (3) for the highest-impact scenario, the deployment environment must have a reachable link-local metadata endpoint (169.254.169.254) without IMDSv2 or equivalent enforcement. Exploitation is bounded by the requirement to influence URL input into NLTK functions, the need for DNS control or the ability to cause deliberate resolution failures, and the absence of network-layer egress filtering on the host process.

Impact

The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L) yields a score of 6.9, characterizing this as a remotely exploitable, low-complexity flaw with no authentication requirement and collateral impact on subsequent systems. The low-complexity rating is worth scrutiny: DNS rebinding requires the attacker to control DNS infrastructure for a domain and engineer precise timing windows, which is non-trivial; however, simply using a hostname that produces a DNS resolution failure (e.g., NXDOMAIN, or triggering an OSError/ValueError from socket.getaddrinfo()) may be considerably easier and lowers the practical bar. No EPSS data was provided, no CISA KEV listing exists, and no proof-of-concept exploit has been identified - all signals that reduce immediate mass-exploitation risk. However, for cloud-deployed applications that expose NLTK network-fetch functionality to user-supplied input, the real-world risk is meaningfully higher than the moderate CVSS score implies: successful exploitation targeting 169.254.169.254 in AWS, GCP, or Azure environments without IMDSv2 enforcement can yield IAM role credentials and enable privilege escalation. In non-cloud environments or deployments where NLTK is not exposed to attacker-influenced URL input, practical risk is low.

Exploit ScenarioDerived

An attacker submits a crafted URL referencing a hostname they control to a web application that passes user-supplied URLs into an NLTK network-fetch function. By configuring that hostname to return NXDOMAIN or otherwise trigger an OSError in socket.getaddrinfo(), the SSRF validation in validate_network_url() iterates an empty list, performs no IP checks, and allows urlopen() to proceed. The attacker then uses a redirect or DNS rebinding technique to resolve the hostname to 169.254.169.254 at request time, retrieving AWS instance metadata including attached IAM role credentials. No public proof-of-concept has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 22, 2026

SSRF protection bypass in NLTK affects all versions before 3.10.0, where a fail-open logic error in validate_network_url() allows attackers to reach restricted network resources including cloud metadata endpoints such as 169.254.169.254. The flaw resides in _resolve_hostname(), which silently swallows OSError and ValueError from socket.getaddrinfo() and returns an empty list; the subsequent IP validation loop then iterates zero times, allowing urlopen() to execute the request with no filtering applied. No public exploit code or CISA KEV listing has been identified at time of analysis, but the real-world impact is meaningfully elevated for cloud-deployed applications where metadata API access can expose IAM credentials.

RemediationAI

Upgrade NLTK to version 3.10.0, which contains the vendor-released patch correcting the fail-open behavior in _resolve_hostname(). The vendor advisory at https://github.com/nltk/nltk/security/advisories/GHSA-3gqm-fcw5-w839 should be consulted for full release notes and any additional guidance. Where immediate upgrade is not feasible, deploy egress firewall rules or network policies on the host running NLTK to block outbound traffic to link-local ranges (169.254.0.0/16) and RFC 1918 private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16); this prevents the highest-impact metadata endpoint scenario without fixing the underlying logic flaw, and may break legitimate private-network use cases if any exist. Additionally, audit all application code paths that pass user-controlled or externally sourced URLs into NLTK network functions and add an application-layer allowlist as a defense-in-depth measure. Cloud deployments should enforce IMDSv2 (AWS) or equivalent metadata API hardening that requires a session-oriented PUT request, which simple SSRF cannot satisfy.

Affected VersionsENISA

nltk 0 <3.10.0

Affected Packages

pypi nltk fix: 3.10.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

NLTK (Natural Language Toolkit), identified by CPE cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*, is a widely-used Python library for natural language processing tasks used in research and production. The vulnerability (CWE-918 - Server-Side Request Forgery) lives in nltk/pathsec.py inside validate_network_url(), which is responsible for blocking requests to private, loopback, and link-local IP ranges before delegating to urllib's urlopen(). The _resolve_hostname() helper calls socket.getaddrinfo() to resolve a hostname to IP addresses, then checks each resolved address against a blocklist. The defect is in the exception handler: when socket.getaddrinfo() raises OSError (e.g., NXDOMAIN, network timeout) or ValueError, _resolve_hostname() catches the exception silently and returns an empty list rather than raising an error or refusing the request. Because validate_network_url() iterates over the returned list to perform IP checks, an empty list results in zero iterations and the function exits without blocking - a textbook 'fail open' security error. Python's urlopen() then executes against the original user-supplied URL with SSRF protections entirely bypassed.

Know when Nltk gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
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
vuln.today AI 5.4 MEDIUM

AC:H for DNS rebinding or engineered resolution failure prerequisite; S:C and C:L/I:L reflect cross-boundary access to cloud metadata and internal services.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L
SUSE 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Red Hat 4.2 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
Low

Lifecycle Timeline

1
Patch available
Aug 22, 2026 - 15:01 EUVD

DescriptionCVE.org

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

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 6 pypi packages depend on nltk (6 direct, 0 indirect)

Ecosystem-wide dependent count for version 3.10.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 73% exploitable
Prevalence
Medium
widely-used Python NLP library, common in ML and research deployments
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

54
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

More in Nltk

View all
CVE-2026-79657 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p

CVE-2026-78683 CRITICAL POC
9.4 Aug 25

Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic

CVE-2025-14009 HIGH POC
8.8 Feb 18

Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow

CVE-2026-63312 HIGH POC
8.7 Aug 22

StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc

CVE-2026-62384 HIGH POC
8.7 Aug 22

Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to

CVE-2026-66393 HIGH POC
8.7 Aug 22

Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers

CVE-2026-62388 HIGH POC
8.7 Aug 22

Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse

CVE-2026-78681 HIGH POC
8.7 Aug 25

XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s

CVE-2026-78682 HIGH POC
8.7 Aug 25

Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service

CVE-2026-70626 HIGH POC
8.6 Aug 22

Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu

CVE-2026-62385 HIGH POC
8.2 Aug 22

Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated

CVE-2021-43854 HIGH POC
7.5 Dec 23

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy