MEDIUMCVSS v3.1 5.3Vulnerability

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).st_size` 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` (`_secure_open`). 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 `PathPointer.file_size()`), but the plain string branch reaches `os.stat` with no `validate_path`, `_secure_open`, or `required_root` check. The security invariant "no filesystem access outside allowed roots under ENFORCE" is therefore violated for the metadata channel: `os.stat` is filesystem access, and it is performed on the same untrusted string entry point that the content read fix protected. ```text Affected component: nltk.corpus.reader.util.StreamBackedCorpusView.__init__ Sink: nltk/corpus/reader/util.py, os.stat(self._fileid).st_size on the plain-string branch Guarded sibling: _open() (routes through nltk.pathsec.open); the constructor os.stat is not guarded ``` ## Impact An attacker who can influence the fileid string passed to `StreamBac

Properties

Summary
NLTK: StreamBackedCorpusView constructor os.stat leaks out-of-root file existence, size, and mtime bypassing pathsec ENFORCE
Severity
medium
Nvd fetched at
2026-11-22T12:30:49.958423+00:00
Epss score
0.0034
Cvss score
5.3
Cvss severity
MEDIUM
Retrieved at
2026-11-22T12:32:26+00:00
Ghsa published
2026-11-19T23:47:58Z
Source url
https://github.com/advisories/GHSA-w674-vqhw-g3pg
Ghsa updated
2026-11-19T23:47:59Z
Ghsa id
GHSA-w674-vqhw-g3pg
Last source
FIRST EPSS
Score
5.3
Cvss version
3.1
Cve id
CVE-2026-129233
Cvss vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
First seen by Signal
2026-11-19T19:29:21+00:00
Name
CVE-2026-129233
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Related Entities (4)

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-129233 (CVSS v3.1 5.3) — Ninja Signal Threat Intelligence | Ninja Signal