The CVSS 7 score for this path traversal bypass understates the actual risk when you consider what pathsec is supposed to guarantee. NLTK's pathsec feature was explicitly designed to constrain file operations to designated roots — the vulnerability means that constraint is selectively non-functional for model I/O operations, specifically in TransitionParser, AveragedPerceptron, PerceptronTagger, and maxent APIs. These are not incidental code paths; they handle serialized model artifacts that get loaded into memory and executed within NLP pipelines.
The critical detail is that this is a bypass of an existing security control, not merely a missing control. Users who enabled pathsec did so specifically to contain untrusted model inputs — the assumption was that file writes would be restricted to designated paths. This vulnerability means that assumption is false. The write capability compounds the severity: an attacker who can control model parameters or training data through these APIs could overwrite executable Python files, configuration content, or SSH keys depending on the deployment context.
What makes this worse than a typical path traversal is the cascade topology. These APIs don't just read a config file — they operate on model artifacts that get deserialized and trusted downstream. Overwrite a tagger model, and every NLP pipeline loading that model inherits compromised state. Overwrite a parser, and downstream components receiving parse output get corrupted data. In typical ML deployments where models cross trust boundaries (downloaded from repos, cached locally, served to applications), a single write-through-bypass could poison caches that multiple applications trust simultaneously.
The architectural question worth investigating: whether these four APIs share a common code path that failed to route through pathsec validation, or represent independent oversights. Either case suggests a systemic gap in how pathsec was integrated — it was likely added as an overlay rather than designed into foundational file-handling patterns, creating friction that developers worked around with raw file operations.
Prioritise: verify whether your deployment invokes any of these four APIs with attacker-influenced paths, audit any model caching or loading from untrusted sources, and treat pathsec-enabled deployments as having had a false security guarantee rather than a simple misconfiguration.