NLTK: StreamBackedCorpusView constructor os.stat leaks out-of-root file existence, size, and mtime bypassing pathsec ENFORCE
CVE-2026-129233
Summary StreamBackedCorpusView, a public API in nltk/corpus/reader/util.py, applies the pathsec sandbox to the file content it reads but not to the file metadata it probes in its constructor. When the view is created with a plain string fileid, init calls os.stat(self.fileid).stsize with no pathsec validation, so an application that passes an attacker influenced path to the constructor discloses whether an arbitrary out of root file exists and, if it does, its exact byte size and modification time, even when nltk.pathsec.ENFORCE is True. This is the residual metadata channel left open by the fix for CVE-2026-63312 (GHSA-x5ph-mj9p-rfr8), which closed arbitrary content read on the same code path but did not bring the sibling os.stat under the sandbox. Root Cause The pathsec sandbox is intended to confine all NLTK filesystem access to allowed data roots. The fix for CVE-2026-63312 enforced this for content reads by routing StreamBackedCorpusView.open through nltk.pathsec.open (secureopen). The constructor, however, computes the end of file position eagerly, and on the non PathPointer branch it stats the caller supplied path directly. The PathPointer branch is validated (it calls…
Assessment
- CVSS
- 5.3 (v3.1)
- Severity
- Medium
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 19 November 2026
- Last updated
- 19 November 2026
- Affected
- nltk
- Weakness
- CWE-200, CWE-538
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
At the source
References
- https://github.com/nltk/nltk/security/advisories/GHSA-w674-vqhw-g3pg
- https://nvd.nist.gov/vuln/detail/CVE-2026-129233
- https://github.com/nltk/nltk/pull/3888
- https://github.com/nltk/nltk/commit/2c563b13f9dce7c15eefd4b03463e1b69b64f1f3
- https://github.com/nltk/nltk/commit/68434c0427f8d296f3adfddb518525038d1f7bfa
- https://github.com/nltk/nltk/releases/tag/v3.10.4
- https://github.com/advisories/GHSA-w674-vqhw-g3pg
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-129233