# CVE-2026-31248: Docling XML Entity Expansion in METS GBS backend

Source: https://junglewise.ai/threats/cve-2026-31248-docling-xml-entity-expansion-in-mets-gbs-backend  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-11. Updated: 2026-05-18  
License: CC BY 4.0 with a link back

CVE-2026-31248 · Severity: high · CVSS 7.5 · Published 2026-05-11

Docling, a tool used to prepare documents for AI applications, is vulnerable to a denial-of-service attack. By providing a specially crafted archive file containing a malicious XML document, an attacker can cause the system to consume excessive resources. This can lead to the application becoming unresponsive or crashing, disrupting document processing operations.

Technologies: [Docling Project Docling](https://junglewise.ai/threats/technologies/docling-project-docling), [docling (PyPI)](https://junglewise.ai/threats/technologies/pypi-docling). Vendors: [Docling Project](https://junglewise.ai/threats/vendors/docling-project), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-31248 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-31248 being exploited in the wild.

**How severe is CVE-2026-31248?** High severity, with a CVSS score of 7.5, published 11 May 2026.

**Which products and versions are affected?** Docling Project Docling up to and including 2.61.0; docling (PyPI) ECOSYSTEM:introduced=0,last_affected=2.61.0.

**Is there a fix for CVE-2026-31248?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-31248 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-31248?** Check whether you run Docling Project Docling or docling (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

Docling's METS GBS backend is vulnerable to an XML Entity Expansion (XXE) attack, specifically an 'XML Bomb'. The vulnerability exists because the backend uses the 'etree.fromstring()' function to parse XML files extracted from .tar.gz archives without disabling entity resolution. An attacker can exploit this by submitting a crafted archive containing an XML file with deeply nested entity definitions. When parsed, these entities expand exponentially, leading to extreme CPU and memory consumption. This results in a denial-of-service (DoS) on the host system. The vulnerability affects versions up to and including 2.61.0; as of the advisory date, no patched version is specified.

## Affected products

- docling-project docling <= 2.61.0

## Identifiers

- CVE-2026-31248
- GHSA-9f4q-q82q-4359
- PYSEC-2026-2454

## Timeline

- 2026-05-11: disclosed
- 2026-05-11: advisory: GitHub Advisory published

## References

- [https://github.com/docling-project/docling](https://github.com/docling-project/docling)
- [https://www.notion.so/CVE-2026-31248-35d1e1393188818585b2ce3b9ce24686](https://www.notion.so/CVE-2026-31248-35d1e1393188818585b2ce3b9ce24686)

## Related threats

- [Docling METS-GBS archive member limit enforced after full enumeration](https://junglewise.ai/threats/duplicate-advisory-docling-mets-gbs-archive-member-limit-enforced-after-087423a8)
- [Docling arbitrary filesystem read via unvalidated xlink:href in ODF images](https://junglewise.ai/threats/cve-2026-105751-docling-simplifies-document-processing-by-parsing-diverse)
- [Docling local file disclosure in HTML rendering](https://junglewise.ai/threats/cve-2026-105750-docling-simplifies-document-processing-by-parsing-diverse)
- [Docling unbounded table span allocation denial of service](https://junglewise.ai/threats/cve-2026-105749-docling-simplifies-document-processing-by-parsing-diverse)
- [IBM Docling arbitrary local file read via JSON backend](https://junglewise.ai/threats/cve-2026-105748-docling-simplifies-document-processing-by-parsing-diverse)
