PT-2026-66886

CVE-2026-12072

·

Published

2026-07-31

·

Updated

2026-08-13

Description by

CVSS 3.1
7.5
High
MetricsAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Name of the Vulnerable Software and Affected Versions nltk versions prior to 3.9.5
Description A path-traversal issue in NKJPCorpusReader allows an attacker to read files outside the designated corpus root by influencing the fileids argument. This occurs because the reader uses plain string concatenation and the builtin open() function without performing containment checks, effectively bypassing the nltk.pathsec sandbox and its ENFORCE = True strict mode. The vulnerability is present in the add root() function and affects public read methods including header(), raw(), words(), sents(), and tagged words(). Specifically, the header() method can return the parsed content of an arbitrary out-of-root file to the caller. The issue stems from the use of os.path.join and builtin open() instead of the hardened FileSystemPathPointer API.
Recommendations Update nltk to a version where the NKJPCorpusReader and related components use FileSystemPathPointer.open() and validate path() to ensure file access is restricted to allowed directories. As a temporary mitigation, avoid passing user-influenced values to the fileids argument in NKJPCorpusReader methods.
Exploitability
Fix
Impacts
Vendors
Affected products
Related identifiers
GHSA-6HM5-JGCP-P838
ECHO-FAF4-47F5-99EF
OPENSUSE-SU-2026:11469-1
PYSEC-2026-3581
Found an issue in the description? Have something to add? Feel free to write us 👾