Inefficient Algorithmic Complexity Affecting nltk package, versions [,3.10.3)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.23% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-NLTK-19513454
  • published3 Sept 2026
  • disclosed27 Aug 2026
  • creditUnknown

Introduced: 27 Aug 2026

NewCVE-2026-81725  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade nltk to version 3.10.3 or higher.

Overview

nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the read_block method of TEICorpusView (nltk/corpus/reader/pl196x.py), whose lazy .*? whole-block regexes rescan the text from each opening-tag position. An attacker can force quadratic CPU growth and stall the parser thread by supplying a PL196X or TEI-like corpus file with many unmatched opening tags, so each regex attempt scans to the block end, fails, and restarts from the next tag. This requires the application to parse an attacker-influenced corpus file through the Pl196xCorpusReader public APIs such as words() or tagged_words().

CVSS Base Scores

version 4.0
version 3.1