CVE-2026-33231: Nltk Lexical Path Traversal Symlink

Insufficient lexical boundary check allows directory traversal via symbolic links. Checking paths using only `os.path.isabs` and substring checks for `..` fails to prevent symlink-based boundary escapes. Use `Path.resolve()` to resolve links and enforce scoped sandbox constraints.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-33231-nltk-lexical-path-traversal-symlink --engine opengrep

Description

Insufficient lexical boundary check allows directory traversal via symbolic links. Checking paths using only `os.path.isabs` and substring checks for `..` fails to prevent symlink-based boundary escapes. Use `Path.resolve()` to resolve links and enforce scoped sandbox constraints.