NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() direct

PYSEC-2026-3730
HIGH 8.7OSV

At a glance

Source
OSV
Published
Updated
CVE
CVE-2026-63312
Aliases
GHSA-x5ph-mj9p-rfr8
CVSS_V4
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVE severity
HIGH 8.7 · CVE-2026-63312

Description

NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() directly instead of pathsec.open(). Attackers who control the fileid argument can read arbitrary local files regardless of the ENFORCE setting, including sensitive system files and application credentials.

References

Affected packages

PackageVersions
PyPI · nltkintroduced 0, fixed 3.10.0

Sources

SourceLicence
OSV.devCC-BY 4.0 — PyPA Advisory Database