{"id":"CVE-2026-126300","kind":"vulnerability","aliases":["CVE-2026-126300"],"related":[],"title":"NLTK: tokenizer lets long quote-character input exhaust CPU","description":"NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause quadratic CPU consumption through repeated list.pop(0) calls. Attackers can submit long runs of double-quote characters to services span-tokenizing untrusted text, exhausting a CPU core and degrading availability.","summary":"NLTK's TreebankWordTokenizer.span_tokenize runs in quadratic time because it repeatedly calls list.pop(0) on long runs of double-quote characters. An attacker who submits such text to a service that span-tokenizes untrusted input can use up a CPU core and degrade availability.","severity":"medium","cvss":6.9,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["nlp","nltk","package","python"],"not_affected_if":["no-span-tokenize","trusted-input-only"],"how_to_check":"- Check the installed NLTK version with `pip show nltk` or `python -c \"import nltk; print(nltk.__version__)\"`.\n- Search your code for `span_tokenize` calls on user-supplied text, such as `TreebankWordTokenizer`.","fix":"- NLTK: move to `3.10.4` or later.","status":"open","published_at":"2026-11-13T10:17:34+00:00","first_seen_at":"2026-11-13T10:47:14+00:00","triaged_at":"2026-11-13T10:54:49+00:00","updated_at":"2026-11-13T10:54:49+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-13T10:54:49Z","model":"claude-haiku-5-5","output":{"fix":"- NLTK: move to `3.10.4` or later.","reach":"internet","title":"NLTK: tokenizer lets long quote-character input exhaust CPU","impact":"low","summary":"NLTK's TreebankWordTokenizer.span_tokenize runs in quadratic time because it repeatedly calls list.pop(0) on long runs of double-quote characters. An attacker who submits such text to a service that span-tokenizes untrusted input can use up a CPU core and degrade availability.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","nltk","nlp"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Repeated requests exhaust a CPU core and degrade service availability.","analyst_note":"","how_to_check":"- Check the installed NLTK version with `pip show nltk` or `python -c \"import nltk; print(nltk.__version__)\"`.\n- Search your code for `span_tokenize` calls on user-supplied text, such as `TreebankWordTokenizer`.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["trusted-input-only","no-span-tokenize"],"who_is_affected":"Applications that pass untrusted user text to NLTK's TreebankWordTokenizer.span_tokenize are exposed, since a crafted input can stall a CPU core. Batch jobs and services that only tokenize trusted internal text can skip it.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000734,"input_tokens":4631,"output_tokens":541,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-126300':13A,16A '-2026':12A,15A '0':34B,92C '3.10.4':71C '3.2.5':69C 'algorithm':74C 'allow':81C 'attack':44B,83C,94C 'avail':66B,117C 'call':32B,93C 'caus':85C 'charact':7A,42B,103C 'complex':75C 'consumpt':88C 'contain':72C 'core':63B,114C 'cpu':10A,62B,87C,113C 'cve':11A,14A 'degrad':65B,116C 'doubl':40B,101C 'double-quot':39B,100C 'exhaust':9A,111C 'input':8A,57B 'let':3A 'list.pop':33B,91C 'long':4A,36B,97C 'nlp':17B 'nltk':1A,18B,21B,67C 'packag':19B 'python':20B 'quadrat':27B,86C 'quot':6A,41B,102C 'quote-charact':5A 'remot':82C 'repeat':31B,90C 'run':25B,37B,98C 'servic':51B,105C 'span':54B,107C 'span-token':53B,106C 'submit':46B,96C 'text':48B,110C 'time':28B 'token':2A,24B,55B,79C,108C 'treebankwordtokenizer.span':23B,78C 'untrust':56B,109C 'use':59B 'vulner':76C","nicknames":[],"mitigations":[],"who_affected":"Applications that pass untrusted user text to NLTK's TreebankWordTokenizer.span_tokenize are exposed, since a crafted input can stall a CPU core. Batch jobs and services that only tokenize trusted internal text can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["medium","nlp","nltk","package","python"],"campaign_type":null,"search_a":"'-126300':13A,16A '-2026':12A,15A 'charact':7A 'cpu':10A 'cve':11A,14A 'exhaust':9A 'input':8A 'let':3A 'long':4A 'nltk':1A 'quot':6A 'quote-charact':5A 'token':2A","search_b":"'0':34B 'attack':44B 'avail':66B 'call':32B 'charact':42B 'core':63B 'cpu':62B 'degrad':65B 'doubl':40B 'double-quot':39B 'input':57B 'list.pop':33B 'long':36B 'nlp':17B 'nltk':18B,21B 'packag':19B 'python':20B 'quadrat':27B 'quot':41B 'repeat':31B 'run':25B,37B 'servic':51B 'span':54B 'span-token':53B 'submit':46B 'text':48B 'time':28B 'token':24B,55B 'treebankwordtokenizer.span':23B 'untrust':56B 'use':59B","search_c":"'0':92C '3.10.4':71C '3.2.5':69C 'algorithm':74C 'allow':81C 'attack':83C,94C 'avail':117C 'call':93C 'caus':85C 'charact':103C 'complex':75C 'consumpt':88C 'contain':72C 'core':114C 'cpu':87C,113C 'degrad':116C 'doubl':101C 'double-quot':100C 'exhaust':111C 'list.pop':91C 'long':97C 'nltk':67C 'quadrat':86C 'quot':102C 'remot':82C 'repeat':90C 'run':98C 'servic':105C 'span':107C 'span-token':106C 'submit':96C 'text':110C 'token':79C,108C 'treebankwordtokenizer.span':78C 'untrust':109C 'vulner':76C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-10-26T10:07:05+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-126300","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126300","severity":null,"published_at":"2026-11-13T10:17:34+00:00","modified_at":"2026-11-13T10:17:35+00:00","first_seen_at":"2026-11-13T10:47:14+00:00","fetched_at":"2026-11-13T10:47:14+00:00","note":null}],"documents":[{"id":144929,"url":"https://github.com/nltk/nltk/security/advisories/GHSA-ffr9-mgrr-wcvr","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-10-26T10:07:05+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"},{"id":144930,"url":"https://www.vulncheck.com/advisories/nltk-from-3.2.5-before-3.10.4-cpu-exhaustion-via-treebankwordtokenizer-span-tokenize","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}