{"id":"CVE-2026-0847","kind":"vulnerability","aliases":["CVE-2026-0847","GHSA-68j8-pq59-fqgm"],"related":[],"title":"NLTK has a Path Traversal issue","description":"A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail to properly sanitize or validate file paths, enabling attackers to traverse directories and access sensitive files on the server. This issue is particularly critical in scenarios where user-controlled file inputs are processed, such as in machine learning APIs, chatbots, or NLP pipelines. Exploitation of this vulnerability can lead to unauthorized access to sensitive files, including system files, SSH private keys, and API tokens, and may potentially escalate to remote code execution when combined with other vulnerabilities.","summary":"NLTK up to and including 3.9.2 fails to validate file paths in several CorpusReader classes, so user-supplied file names can point outside the intended directory. An attacker who controls those inputs can read sensitive files on the server such as SSH keys and API tokens.","severity":"high","cvss":8.6,"epss":0.01,"exploited":false,"exploited_at":null,"products":[{"name":"nltk","fixed":["3.9.3"],"affected":"<= 3.9.2","ecosystem":"pypi"},{"name":"nltk","fixed":[],"affected":"<= 3.9.2","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["cwe-22","ml-apis","nlp-pipelines","nltk","package","python"],"not_affected_if":["fixed-corpus-paths","no-user-controlled-file-input"],"how_to_check":"- Check the installed version with `pip show nltk` and treat anything at or below `3.9.2` as affected.\n- Look for code that passes user-controlled file names or paths into WordListCorpusReader, TaggedCorpusReader or BracketParseCorpusReader.","fix":"- Upgrade NLTK to `3.9.3`.","status":"open","published_at":"2026-03-04T19:16:10+00:00","first_seen_at":"2026-11-04T03:16:03+00:00","triaged_at":"2026-11-04T03:16:20+00:00","updated_at":"2026-11-04T03:46:40+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-04T03:16:20Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade NLTK to `3.9.3`.","reach":"network","title":"NLTK: path traversal in corpus readers lets attackers read server files","impact":"high","summary":"NLTK up to and including 3.9.2 fails to validate file paths in several CorpusReader classes, so user-supplied file names can point outside the intended directory. An attacker who controls those inputs can read sensitive files on the server such as SSH keys and API tokens.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","nltk","ml-apis","nlp-pipelines"],"confidence":0.8,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker reads SSH keys, API tokens and system files on the server","analyst_note":"","how_to_check":"- Check the installed version with `pip show nltk` and treat anything at or below `3.9.2` as affected.\n- Look for code that passes user-controlled file names or paths into WordListCorpusReader, TaggedCorpusReader or BracketParseCorpusReader.","plain_action":"","needs_analyst":false,"not_affected_if":["fixed-corpus-paths","no-user-controlled-file-input"],"who_is_affected":"Teams that use NLTK in services where user input chooses which corpus file gets read, such as ML APIs, chatbots or NLP pipelines. Projects that only load fixed local corpora that no one outside the team can influence are much less exposed. The sources do not say whether default configurations are affected.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.000709,"input_tokens":4311,"output_tokens":555,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-0847':9A,17A '-2026':8A,16A '-22':21B '3.9.2':36B,87C '68j8':12A 'access':120C,159C 'allow':88C 'api':24B,76B,146C,170C 'arbitrari':89C 'attack':59B,115C 'bracketparsecorpusread':103C 'chatbot':147C 'class':45B,98C,105C 'code':178C 'combin':181C 'control':61B,136C 'corpusread':44B,97C 'critic':130C 'cve':7A,15A 'cwe':20B 'directori':57B,118C 'enabl':114C 'escal':175C 'execut':179C 'exploit':151C 'fail':37B,106C 'file':40B,50B,67B,90C,112C,122C,137C,162C,165C 'fqgm':14A 'ghsa':11A 'ghsa-68j8-pq59-fqgm':10A 'includ':35B,86C,99C,163C 'input':63B,138C 'intend':56B 'issu':6A,127C 'key':74B,168C 'lead':156C 'learn':145C 'machin':144C 'may':173C 'ml':23B 'ml-api':22B 'multipl':96C 'name':51B 'nlp':26B,149C 'nlp-pipelin':25B 'nltk':1A,18A,19A,28B,31B,81C 'outsid':54B 'packag':29B 'particular':129C 'path':4A,41B,93C,113C 'pipelin':27B,150C 'point':53B 'potenti':174C 'pq59':13A 'privat':167C 'process':140C 'proper':108C 'python':30B 'read':65B,91C 'remot':177C 'sanit':109C 'scenario':132C 'sensit':66B,121C,161C 'server':70B,125C 'sever':43B 'ssh':73B,166C 'suppli':49B 'system':164C 'taggedcorpusread':101C 'token':77B,171C 'travers':5A,94C,117C 'unauthor':158C 'user':48B,135C 'user-control':134C 'user-suppli':47B 'valid':39B,111C 'version':82C 'via':92C 'vulner':79C,154C,184C 'wordlistcorpusread':100C","nicknames":[],"mitigations":[],"who_affected":"Teams that use NLTK in services where user input chooses which corpus file gets read, such as ML APIs, chatbots or NLP pipelines. Projects that only load fixed local corpora that no one outside the team can influence are much less exposed. The sources do not say whether default configurations are affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["nltk"],"ptokens":["nltk"],"labels":["cwe22","high","mlapis","nlppipelines","nltk","package","pypi","python","vendor"],"campaign_type":null,"first_public_at":"2026-03-04T19:16:10+00:00","kev":null,"cvss_vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-68j8-pq59-fqgm","url":"https://github.com/advisories/GHSA-68j8-pq59-fqgm","severity":"high","published_at":"2026-03-04T21:32:45+00:00","modified_at":"2026-11-04T03:13:12+00:00","first_seen_at":"2026-11-04T03:16:03+00:00","fetched_at":"2026-11-04T03:16:03+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-0847","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0847","severity":null,"published_at":"2026-03-04T19:16:10+00:00","modified_at":"2026-07-15T02:17:57+00:00","first_seen_at":"2026-11-04T03:46:40+00:00","fetched_at":"2026-11-04T03:46:40+00:00","note":null}],"documents":[{"id":63831,"url":"https://huntr.com/bounties/fc69914f-36a9-4c18-8503-10013b39f966","title":"Vendor advisory: huntr.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Vendor advisory: huntr.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}