Products / nltk
nltk
63 records.
- NLTK: Path Traversal in save_maxent_params / load_maxent_params Allow Arbitrary File READ/WRITE The maxent save and load functions open files under a caller-supplied directory without the library's path restriction check, allowing reads and writes elsewhere.
- NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element A partial earlier fix left one Graphviz call resolving dot from PATH without trust checks, so a planted binary in a writable directory runs.
- NLTK: Symlink escape in chat80.sql_query bypasses the pathsec data-root sandbox to read out-of-root SQLite databases Symlinks inside a trusted data root are followed by sqlite3 because lookup never resolves real paths, letting queries reach databases outside the sandboxed roots.
- NLTK: Quadratic-time CPU denial of service in CCG lexicon parser (fromstring) on wide bracket bodies and operator chains A lexicon parser repeatedly copies remaining input while scanning bracket bodies and operators, so long flat inputs cause quadratic CPU consumption.
- NLTK: Quadratic-time CPU denial of service in Tree.chomsky_normal_form right-factor binarization via list.pop(0) A wide flat parse tree makes right-factor binarization quadratic in child count, so a single crafted tree from untrusted input stalls the CPU.
- NLTK: Quadratic-time CPU denial of service in ConllCorpusReader SRL instance builder via nested span rescan Parsing a crafted CoNLL SRL block forces quadratic-time span rescans for each predicate, consuming large amounts of single-threaded CPU.
- NLTK: Unbounded CPU consumption in SteppingRecursiveDescentParser.parse() with ambiguous or self-embedding grammars The stepping recursive descent parser runs without a time or step limit, so an ambiguous grammar with short input can pin a CPU core indefinitely.
- NLTK: Quadratic CPU exhaustion in TreebankWordTokenizer.span_tokenize via list.pop(0) in quote-restore loop Repeated list removal inside the quote-restoration step lets a long run of quote characters consume a CPU core for a prolonged period.
- NLTK: BllipParser passes caller-supplied model paths to the bllipparser C extension with no pathsec check, enabling arbitrary read BllipParser passes caller-chosen paths straight to a native extension, skipping NLTK's path validation, so arbitrary readable files can be opened.
- NLTK: Quadratic CPU exhaustion in LegalitySyllableTokenizer.tokenize via unguarded onset reversal loop Passing one long all-vowel token to the syllable tokenizer triggers a quadratic loop that keeps a CPU core busy for the duration of the call.
- NLTK: Symlink escape in YCOECorpusReader lets a psd/pos directory symlink read files outside the corpus root within the data sandbox A directory symlink inside a corpus lets nested readers escape the corpus root and read files elsewhere in the data sandbox.
- NLTK: WekaClassifier passes an unvalidated caller-controlled model path to the weka JVM, bypassing nltk.pathsec containment The WekaClassifier wrapper passes caller-supplied model paths to the Java tool unchecked, skipping the containment checks that other NLTK loaders apply.
- NLTK: Corpus Reader Sandbox Bypass Two NLTK corpus reader constructors open files and databases from outside the root before the pathsec sandbox check runs, letting callers read arbitrary paths.
- NLTK: Symlink-based arbitrary file read in IPIPANCorpusReader, bypasses nltk.pathsec entirely A symlink inside the corpus root passes traversal checks, and the IPIPAN reader opens it with builtin open, reading arbitrary files the process can access.
- NLTK: Stable FrameNet and NKJP readers parse outside-root XML NLTK reader functions build XML file paths from unvalidated selectors or index values, letting traversal read files outside the corpus root.
- NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection The NLTK downloader unpacks downloaded archives without checking their hash, so a tampered package can deliver malicious pickle files.
- NLTK: pathsec SSRF protection can be bypassed when a proxy is configured When a proxy is configured, the NLTK URL check validates the hostname but the fetch goes through the proxy, reaching internal services the check was meant to block.
- NLTK: FileSystemPathPointer.open() sandbox check is dead code — arbitrary file read via file:// protocol A logic error makes the absolute-path check in the file pointer's open method never trigger, so any file the process can read is loaded through a file URL.
- NLTK: Pl196xCorpusReader has quadratic ReDoS on malformed TEI blocks Lazy regexes over a TEI block rescan from each unmatched opening tag, so a malformed corpus file causes quadratic CPU growth in reader calls.
- NLTK: Entity-expansion DoS (billion laughs) via remaining raw ElementTree parses Entity-declaring XML handed to several NLTK parsers expands exponentially in memory, exhausting resources, because those call sites bypassed the safe XML parsing helper.
- NLTK: Symlink-based sandbox bypass in FramenetCorpusReader (bypasses the fix for CVE-2026-54292) A symlink with a separator-free name inside the corpus directory passes the name check, so reads resolve to files outside the corpus root.
- NLTK: Corpus readers follow symlinks outside trusted roots despite pathsec enforcement Symlinks inside a trusted corpus root point outside it, and corpus readers open those targets with plain open(), skipping NLTK's path security check.
- NLTK: Symlink escape in CorpusReader allows arbitrary local file read outside the corpus root A symlink inside the corpus root points outside it; the lexical path check passes, so reads follow the link to arbitrary local files.
- NLTK: Unsafe Pickle Deserialization in TransitionParser Allows Remote Code Execution NLTK TransitionParser unpickles model files without restriction, so a malicious model runs code when it is loaded.
- NLTK: ReDoS in nltk.text.Text.findall() via unvalidated user-supplied regular expressions User-supplied regular expressions passed to NLTK Text.findall run without timeout or validation, allowing catastrophic backtracking.
- NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions A user-supplied regular expression in the tgrep query path is compiled and run without limits, so a crafted pattern against a non-matching label causes exponential backtracking.
- NLTK: StreamBackedCorpusView Bypasses pathsec.ENFORCE - Arbitrary Local File Read A corpus reader opens files directly without the enforced path check, so attacker-chosen file IDs can read any local file.
- NLTK: Allowlisted pickle loaders still permit code execution in current source Allowlisted pickle loaders trust whole module namespaces, so a crafted pickle can call dangerous helpers such as subprocess-spawning functions during unpickling.
- NLTK: SSRF Fail-Open in validate_network_url() via DNS Resolution Failure When DNS resolution fails, validate_network_url returns without rejecting the URL, so urlopen fetches internal targets such as cloud metadata endpoints.
- NLTK: Model-artifact APIs bypass pathsec and touch files outside allowed roots Model import and export functions call plain open() on caller-supplied paths, skipping the path guard that sibling helpers apply and reading or writing outside allowed roots.
- NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input The featstruct parser recurses on nested brackets with no depth limit, so a short, deeply nested string exhausts the stack and raises an uncaught RecursionError.
- NLTK: Downloader.download follows hardlinks and overwrites outside-root files The downloader blocks symlink escapes but not pre-existing hardlinks, so extracting a package writes through a hardlink and modifies a file outside the install root.
- NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars The recursive descent parser explores parses without a bound, so crafted left-recursive or ambiguous grammars exhaust CPU and stack.
- NLTK: Default ENFORCE=False Disables All pathsec Security Controls The security checks added for earlier CVEs only log warnings by default, so path traversal, unsafe URLs and unsafe pickle loading still proceed.
- NLTK: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()` Each read loop iteration rescans the whole accumulated XML buffer, so a malformed corpus file makes parsing time grow quadratically and exhaust CPU.
- NLTK: Quadratic-time DoS in PorterStemmer via long runs of 'y' A long run of the letter y makes the stemmer's measure routine rescan backwards on every call, so stemming time grows quadratically with token length.
- NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary The dot binary is launched by bare name, so a planted file named dot in the working directory or a PATH entry runs instead of Graphviz.
- NLTK: JVM argument injection bypass via per-call options in the NLTK Stanford wrappers (incomplete fix of CVE-2026-12841) Per-call Java options skip the validator added for an earlier fix, letting callers pass agent flags that run code inside the JVM.
- NLTK AllowlistUnpickler dotted-name validation bypass allows remote code execution A malicious transition-parser model uses dotted-name attribute traversal to reach callables outside the unpickler allowlist, running commands when the model loads.
- NLTK CrubadanCorpusReader path traversal allows arbitrary file disclosure A corpus mapping value that is an absolute path makes the reader open files outside the corpus, skipping the containment check.
- NLTK TweetTokenizer vulnerable to denial of service through catastrophic regex backtracking Crafted strings of repeated separators make a tokenizer regex backtrack exponentially, so a few kilobytes of text can stall a worker thread for minutes.
- nltk: Arbitrary File Read via Path Traversal in nltk.data.load() through Percent-Encoded Sequences Percent-encoded dot segments pass path checks that run before url2pathname decodes them, letting resource lookups escape the NLTK data directory.
- NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts The private-address check misses the RFC 6598 shared range, so URLs pointing there pass validation and are fetched by the server.
- NLTK downloader allows cross-package resource and model poisoning The downloader extracts packages into shared directories and verifies integrity only afterwards, so one package can overwrite another's corpora and models.
- Natural Language Toolkit (NLTK): Path Traversal in NKJPCorpusReader leads to Arbitrary File Read and bypasses the nltk.pathsec sandbox (ENFORCE=True) The corpus reader joins attacker-supplied file IDs to the root without containment checks, reading files outside the corpus while skipping the library's path validation.
- Natural Language Toolkit (NLTK): ReDoS in NLTK ReviewsCorpusReader FEATURES regex A regex in the reviews corpus reader backtracks quadratically on a long line without brackets, so one crafted line stalls parsing.
- Natural Language Toolkit (NLTK): DNS-rebinding SSRF filter bypass in nltk.pathsec.urlopen (nltk.download / nltk.data.load) defeats ENFORCE mode The SSRF check resolves a hostname separately from the actual connection, so DNS rebinding returns a public address for validation and an internal one for connecting.
- Natural Language Toolkit (NLTK) has path traversal in FramenetCorpusReader.frame() that allows arbitrary XML file read, bypassing the nltk.pathsec sandbox (ENFORCE=True) A name containing parent-directory sequences is joined into a corpus XML path read with plain open, skipping the pathsec check and reading files outside the corpus.
- NLTK vulnerable to Eval Injection via collocations CLI arguments Command-line arguments are passed straight into eval as attribute names, letting an attacker inject Python expressions that run OS commands.
- NLTK Stanford wrapper classes execute untrusted JAR files without verification Five Stanford wrapper classes run user-supplied JAR files through Java without the SHA256 verification added to one sibling class.