NLTK fixes flaw allowing file reads and creation when loading untrusted models
- NLTK
- numpy
- pickle
- unpickler

Flaw allowed unauthorized file access via numpy submodules
Users should update to version 3.10.4 to address the risk
NLTK maintainers patched a flaw in its AllowlistUnpickler that could let untrusted model files trigger file reads or create files on the host loading them. The issue affects NLTK versions 3.10.0 through 3.10.3 and is fixed in version 3.10.4.
The flaw was in how NLTK checked a denylist of dangerous functions: it missed file-handling functions located in numpy submodules. When loading an untrusted model, the affected code could invoke numpy.lib._npyio_impl.recfromtxt to read a file or numpy.lib.format.open_memmap to create one.
The impact is limited to file reading and creation; the advisory says the flaw does not allow code execution. Users of affected versions should upgrade to NLTK 3.10.4.
Key terms explained
- NLTK
NLTK is a software platform designed for building Python applications that process human language data.




