{"uuid": "ba8c70de-d83d-4d0d-b443-3e6d108741ab", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2026-12243", "type": "seen", "source": "https://gist.github.com/alon710/3eb28c932c38464a242f2a0a9b534f73", "content": "# CVE-2026-12243: CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK\n\n&gt; **CVSS Score:** 7.5\n&gt; **Published:** 2026-08-13\n&gt; **Full Report:** https://cvereports.com/reports/CVE-2026-12243\n\n## Summary\nCVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.\n\n## TL;DR\nA path traversal vulnerability in NLTK 3.9.4 allows remote unauthenticated attackers to read arbitrary files via percent-encoded path traversal sequences because lexical validation occurs before URL decoding.\n\n## Exploit Status: POC\n\n## Technical Details\n\n- **CWE ID**: CWE-22\n- **Attack Vector**: Network (AV:N)\n- **CVSS Base Score**: 7.5\n- **EPSS Score**: 0.00583 (Percentile: 44.89%)\n- **Impact**: Arbitrary File Read / Information Disclosure\n- **Exploit Status**: Proof-of-Concept (PoC) documented\n- **KEV Status**: Not listed\n\n## Affected Systems\n\n- Applications employing NLTK for dynamic resource/corpora loading\n- Web-based natural language processing pipelines using NLTK 3.9.4\n- Jupyter notebooks and machine learning environments loading external corpus names\n- **NLTK (Natural Language Toolkit)**: 3.9.4 (Fixed in: `3.9.5`)\n\n## Mitigation\n\n- Upgrade NLTK to version 3.9.5 or higher.\n- Explicitly configure the path security enforcement setting in NLTK to raise errors rather than warning only: `nltk.pathsec.ENFORCE = True`.\n- Strictly sanitize user-provided file inputs and use alternative lookups like dictionary mapping instead of directly resolving paths from user strings.\n\n**Remediation Steps:**\n1. Step 1: Install NLTK version 3.9.5 via pip: `pip install -U nltk`\n2. Step 2: Add `import nltk.pathsec` and `nltk.pathsec.ENFORCE = True` at the application entry point to ensure enforcement.\n3. Step 3: If accessing files in the current directory is required, explicitly add the current directory to the search paths using `nltk.data.path.append('.')` to allow path validation rules to approve it.\n\n## References\n\n- [Official CVE Record](https://www.cve.org/CVERecord?id=CVE-2026-12243)\n- [NVD Advisory Entry](https://nvd.nist.gov/vuln/detail/CVE-2026-12243)\n- [NLTK Repository Security Commit](https://github.com/nltk/nltk/commit/aec4fce1b84ad725b8975f7365b23a4f626572a9)\n- [NLTK Security Patch Pull Request](https://github.com/nltk/nltk/pull/3522)\n- [Huntr Bug Bounty Database Entry](https://huntr.com/bounties/39aa9354-54ca-4e77-96da-580eb1fe6ed1)\n- [Wiz Vulnerability Analysis Portal](https://www.wiz.io/vulnerability-database/cve/cve-2026-12243)\n\n\n---\n*Generated by [CVEReports](https://cvereports.com/reports/CVE-2026-12243) - Automated Vulnerability Intelligence*", "creation_timestamp": "2026-08-13T22:33:03.303666Z"}