CVE-2026-62388: Insecure Default Security Enforcement in Natural Language Toolkit (NLTK) Path Security Module
Vulnerability ID: CVE-2026-62388
CVSS Score: 7.5
Published: 2026-09-02
CVE-2026-62388 represents a critical design flaw in the Natural Language Toolkit (NLTK) before version 3.10.0. The central security module (nltk/pathsec.py) initialized its validation enforcement flag to false by default. This fail-open configuration rendered security controls—such as path traversal checks, zip archive audits, and SSRF validations—non-blocking, only emitting warnings while permitting arbitrary file operations and code execution.
TL;DR
NLTK versions prior to 3.10.0 initialized path security in an inactive 'fail-open' state by default, allowing attackers to bypass path traversal, SSRF, and zip-extraction protections.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-1188
- Attack Vector: Network
- CVSS v3.1 Score: 7.5 (High)
- CVSS v4.0 Score: 8.7 (High)
- EPSS Score: 0.00457
- Exploit Status: PoC / Structural Bypass documented
- KEV Status: Not Listed
Affected Systems
- Natural Language Toolkit (NLTK)
-
NLTK: < 3.10.0 (Fixed in:
3.10.0)
Code Analysis
Commit: 155e403
Fix insecure default configuration in pathsec.py, harden Windows file:// schema extraction, and implement dedicated downloader concurrency lock
Exploit Details
- GitHub Security Advisory: Analysis of pathsec.py default settings and traversal vector.
Mitigation Strategies
- Upgrade NLTK to version 3.10.0 or later.
- Programmatically override the enforcement state via nltk.pathsec.ENFORCE = True in application entrypoints.
- Implement network-level egress filtering to prevent SSRF vulnerabilities resulting from resource retrieval.
- Configure Python's warning filters to raise errors on RuntimeWarnings triggered by NLTK's security validations.
Remediation Steps:
- Identify all active deployments using NLTK versions prior to 3.10.0.
- Execute 'pip install --upgrade nltk>=3.10.0' to obtain the patched release.
- Verify the fix by checking that 'nltk.pathsec.ENFORCE' evaluates to True under default initialization.
- For systems where upgrading is deferred, inject a configuration script at bootstrap: 'import nltk.pathsec; nltk.pathsec.ENFORCE = True'.
References
- GitHub Security Advisory GHSA-p3m8-78j2-g5p3
- VulnCheck Security Advisory
- NLTK Fix Commit
- NLTK Pull Request #3593
- NLTK Release v3.10.0
Read the full report for CVE-2026-62388 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)