CVE-2026-62388
NLTK ships a security module called pathsec.py that performs path traversal and pickle validation — but these controls are disabled by default (ENFORCE=False). This creates a worse security posture than having no security code at all. When security controls exist as non-functional scaffolding, they manufacture false assurance: developers see that pathsec.py exists and mentally delegate path validation to the library, suppressing their own defensive coding. Meanwhile, the actual vulnerable code paths remain fully operational. The CVE-2026-62388 CVSS 7.5 reflects a genuine but narrow risk. NLTK is a data-processing library that routinely loads corpora and models via pickle. If your pipeline processes untrusted corpus files or models from external sources — particularly through shared model repositories or community corpora distributions — you face arbitrary code execution. However, this isn't a web-facing RCE vector. The realistic attack surface is supply-chain infiltration: malicious corpora uploaded to distribution channels, poisoned model files consumed by downstream pipelines. Assess whether your NLTK usage ingests data from sources you control. The remediation is not a simple flag flip. Flipping ENFORCE=True will break legitimate pipelines that quietly relied on permissive behavior. NLTK sits at the base of hundreds of ML dependency trees — HuggingFace integrations, NLP frameworks, training pipelines. A hard enforcement switch creates a backwards-compatibility cliff: organizations will rationally defer patching rather than accept broken training jobs, extending the exposure window while adversaries know exactly where the gap is. Audit your NLTK usage: identify where corpora and models load from, whether sources are trusted, and whether your code has its own path traversal and deserialization guards independent of pathsec.py. Treat the existence of security code that isn't enforced as active risk — the presence of the module is a liability, not a defense, because it displaces the defensive effort you might otherwise have written yourself.
Reviewed through automated stages and approved by a human before publication.