Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. nltk
  4. ›
  5. CVE-2026-62388

CVE-2026-62388: NLTK: Default ENFORCE=False Disables All pathsec Security Controls

September 2, 2026

NLTK’s pathsec.py security module defaults to ENFORCE=False (line 24), which means all 8 security validation functions only emit RuntimeWarning instead of raising exceptions when violations are detected.

The pathsec module was introduced as the fix for CVE-2024-39705 (arbitrary code execution via pickle) and CVE-2026-0846 (path traversal). However, with ENFORCE=False as the default:

  1. pathsec.open(’/etc/passwd’) succeeds (reads the file, emits warning)
  2. pathsec.validate_network_url(‘http://169.254.169.254/…’) succeeds (warning only)
  3. pickle.loads() via nltk.data.load() proceeds despite unsafe source (warning only)

Every security gate follows the same pattern:

ENFORCE = os.environ.get('NLTK_PATHSEC_ENFORCE', '').lower() in ('1', 'true', 'yes')

def validate_something(path):
if is_violation(path):
if ENFORCE:
raise SecurityError('...')  # Only raised when env var is set
else:
warnings.warn('...', RuntimeWarning)  # Default: warning only

References

  • github.com/advisories/GHSA-p3m8-78j2-g5p3
  • github.com/nltk/nltk/commit/155e40343cff0bf50d233e274a12e04d1428b1d9
  • github.com/nltk/nltk/pull/3593
  • github.com/nltk/nltk/releases/tag/v3.10.0
  • github.com/nltk/nltk/security/advisories/GHSA-p3m8-78j2-g5p3
  • github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3722.yaml
  • nvd.nist.gov/vuln/detail/CVE-2026-62388
  • www.vulncheck.com/advisories/nltk-before-insecure-default-configuration-pathsec

Code Behaviors & Features

Detect and mitigate CVE-2026-62388 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.10.0

Fixed versions

  • 3.10.0

Solution

Upgrade to version 3.10.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-1188: Initialization of a Resource with an Insecure Default

Source file

pypi/nltk/CVE-2026-62388.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:20:57 +0000.