CVE-2026-44020: Docling Unsafe XML Entity Expansion Vulnerability

HIGH
Advisory Identifier: GHSA-m88r-rg27-5xfg
CVSS 7.5
CWE-776 CWE-611
Published
Advisory Summary

CVE-2026-44020 is a HIGH (CVSS 7.5) unsafe xml entity expansion vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Docling libraries in the PyPI ecosystem. The issue involves unsafe xml entity expansion in uspto patent backend. Remediation is available by upgrading affected packages to version 2.74.0.

CVE-2026-44020 at a Glance

CVE Identifier CVE-2026-44020
GHSA Identifier GHSA-m88r-rg27-5xfg
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Docling
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-44020

To remediate this vulnerability, upgrade all affected Docling dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

docling fixed: 2.74.0
pip install docling>=2.74.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show docling

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-44020, inspect your installed packages using pip:

pip show docling

Analyze the terminal output to locate any version of Docling in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.74.0), your application is affected.

Note: The pip show docling command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Docling, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The USPTO patent XML parser used the standard `xml.sax.parseString()` without protection against XML External Entity (XXE) attacks. An attacker could craft malicious USPTO patent XML files with external entity references that could: - Read arbitrary files from the server filesystem - Perform Server-Side Request Forgery (SSRF) attacks - Cause denial of service through entity expansion (Billion Laughs attack) The vulnerability affects three USPTO patent format parsers: ICE (v4.x), Grant v2.5, and Application v1.x. ### Patches Fixed in version 2.74.0. The parser now uses `defusedxml.sax.make_parser()` with secure configuration that blocks external entity resolution (`feature_external_ges=False`, `feature_external_pes=False`) while allowing DTD declarations required by USPTO files. This prevents XXE attacks while maintaining compatibility with the USPTO XML format. ### Workarounds Avoid processing USPTO patent XML files from untrusted sources. Implement resource limits (memory, CPU time) when processing patent documents. ### References - Fix release: [v2.74.0](https://github.com/docling-project/docling/releases/tag/v2.74.0)

CVE-2026-44020 Affected Docling Versions

1 component(s)
Fixed Versions:
2.74.0
Product / Package Ecosystem Affected Versions Fixed Version
docling
PyPI
≥ 2.13.0
< 2.74.0
2.74.0

References

Frequently Asked Questions

What is CVE-2026-44020?
CVE-2026-44020 is a security vulnerability in Docling involving Unsafe XML Entity Expansion in USPTO Patent Backend under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Docling versions are affected?
Affected versions include releases prior to 2.74.0 across affected packages: docling.
What version fixes CVE-2026-44020?
Upgrading to 2.74.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is docling affected?
Yes, docling is affected in releases prior to 2.74.0. Upgrade your dependency to 2.74.0 or later.
What is the CVSS score of CVE-2026-44020?
CVE-2026-44020 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-44020?
CVE-2026-44020 is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') (The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.).
How can I check PyPI dependencies for CVE-2026-44020?
Run the dependency tree command: 'pip show docling'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m88r-rg27-5xfg",
  "modified" : "2026-08-28T18:31:11Z",
  "published" : "2026-06-03T21:14:15Z",
  "aliases" : [ "CVE-2026-44020" ],
  "summary" : "Docling: Unsafe XML Entity Expansion in USPTO Patent Backend",
  "details" : "### Impact\nThe USPTO patent XML parser used the standard `xml.sax.parseString()` without protection against XML External Entity (XXE) attacks. An attacker could craft malicious USPTO patent XML files with external entity references that could:\n- Read arbitrary files from the server filesystem\n- Perform Server-Side Request Forgery (SSRF) attacks\n- Cause denial of service through entity expansion (Billion Laughs attack)\n\nThe vulnerability affects three USPTO patent format parsers: ICE (v4.x), Grant v2.5, and Application v1.x.\n\n### Patches\nFixed in version 2.74.0. The parser now uses `defusedxml.sax.make_parser()` with secure configuration that blocks external entity resolution (`feature_external_ges=False`, `feature_external_pes=False`) while allowing DTD declarations required by USPTO files. This prevents XXE attacks while maintaining compatibility with the USPTO XML format.\n\n### Workarounds\nAvoid processing USPTO patent XML files from untrusted sources. Implement resource limits (memory, CPU time) when processing patent documents.\n\n### References\n- Fix release: [v2.74.0](https://github.com/docling-project/docling/releases/tag/v2.74.0)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "docling"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.13.0"
      }, {
        "fixed" : "2.74.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/docling-project/docling/security/advisories/GHSA-m88r-rg27-5xfg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44020"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:60520"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-44020"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2492456"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/docling-project/docling"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/docling-project/docling/releases/tag/v2.74.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/docling/PYSEC-2026-240.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44020.json"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611", "CWE-776" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-03T21:14:15Z",
    "nvd_published_at" : "2026-06-24T18:17:17Z"
  }
}