Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') Affecting nltk package, versions [,3.10.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (20th 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-19256808
  • published25 Aug 2026
  • disclosed25 Aug 2026
  • creditUnknown

Introduced: 25 Aug 2026

NewCVE-2026-78681  (opens in a new tab)
CWE-776  (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 Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') via the raw xml.etree.ElementTree parsing in nltk.chunk.named_entity.load_ace_file, nltk.internals.ElementWrapper, and nltk.downloader’s XML loaders. An attacker can exhaust memory by supplying a crafted XML document with nested <!ENTITY> declarations that expand a few hundred bytes into megabytes when NLTK parses ACE annotation files, package metadata, or arbitrary XML strings.

CVSS Base Scores

version 4.0
version 3.1