CVE-2026-126298

NLTK: Quadratic-time CPU denial of service in Tree.chomsky_normal_form right-factor binarization via list.pop(0)

High published · updated · also known as GHSA-R53H-RW34-8H97

8.7
CVSS score out of 10 · NVD (vulncheck.com)

Description

NLTK before 3.10.4 contains a denial of service vulnerability in Tree.chomsky_normal_form that allows remote attackers to exhaust CPU through quadratic-time right-factor binarization using list.pop(0). Attackers can supply a wide flat treebank tree parsed by Tree.fromstring to force tens of seconds of single-threaded CPU consumption, blocking the processing thread.

Affected products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
nltk pip <= 3.10.33.10.4 GitHub

References