Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') Affecting docling package, versions [0,2.91.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.07% (21st 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-DOCLING-16757932
  • published19 May 2026
  • disclosed11 May 2026
  • creditUnknown

Introduced: 11 May 2026

NewCVE-2026-31248  (opens in a new tab)
CWE-776  (opens in a new tab)

How to fix?

Upgrade docling to version 2.91.0 or higher.

Overview

docling is a SDK and CLI for parsing PDF, DOCX, HTML, and more, to a unified document representation for powering downstream workflows such as gen AI applications.

Affected versions of this package are vulnerable to Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') through the etree.fromstring function. An attacker can cause excessive resource consumption by submitting a specially crafted XML file with nested entity definitions inside a .tar.gz archive, which, when processed, triggers exponential entity expansion during XML parsing.

CVSS Base Scores

version 4.0
version 3.1