Skip to content

Update docling to v2.131.0 [SECURITY] - #9

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pypi-docling-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pypi-docling-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
docling (changelog) 2.66.0 → 2.131.0 age confidence

Docling: Unsafe Zip Extraction in EasyOCR Model Download

CVE-2026-44017 / GHSA-cjqg-rq2h-2fvj

More information

Details

Impact

In versions < 2.91.0, The EasyOCR model download functionality extracted ZIP archives without validating member paths, enabling Zip Slip attacks. If an attacker could compromise the model download source (via supply chain attack, DNS spoofing, or MITM), they could write arbitrary files to any location writable by the process, potentially achieving:

  • Remote code execution by overwriting Python files or system binaries
  • Persistent backdoors by modifying startup scripts or SSH keys
  • Data corruption or system compromise
Patches

Fixed in version 2.91.0. The extraction process now validates each archive member path using os.path.realpath() to ensure it remains within the target directory, raising a SecurityError for any path traversal attempts.

Workarounds

Ensure model downloads occur over secure, authenticated channels. Use integrity verification (checksums) for downloaded models. Run the application with minimal file system permissions.

References

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Docling: Unsafe Archive Extraction and XML Parsing in METS-GBS Backend

CVE-2026-44018 / GHSA-r3xg-rg9j-67fv

More information

Details

Impact

The METS-GBS backend's XML parsing and the input document format detection lacked security controls, enabling:

  • XML External Entity (XXE) attacks to read local files or cause denial of service
  • Decompression bombs (zip bombs) to exhaust memory and disk space
  • Unbounded archive extraction consuming system resources

An attacker could craft malicious METS-GBS archives that, when processed, could read sensitive files, exhaust system resources, or cause application crashes.

Patches

Fixed in version 2.91.0. The fix implements:

  • Secure XML parsing with resolve_entities=False, load_dtd=False, and no_network=True
  • Configurable limits: 300 MB total extraction size, 10 MB per file, 1000 member count
  • Cumulative size tracking across all extractions
  • Early termination when limits are exceeded
  • Secure format detection of METS-GBS tar archives with _detect_mets_gbs() method: maximum file size (10 MB per file), maximum member count (1000 members), and exception handling to gracefully fail when limits are exceeded
Workarounds

Avoid processing METS-GBS archives from untrusted sources. If necessary, pre-validate archives in an isolated environment with resource limits.

References

Severity

  • CVSS Score: 5.5 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Docling: Unsafe XML Entity Expansion in USPTO Patent Backend

CVE-2026-44020 / GHSA-m88r-rg27-5xfg

More information

Details

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

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Docling: Unsafe URI and Path Handling in HTML Backend

CVE-2026-47214 / GHSA-q29v-xc37-wh5m

More information

Details

Impact

The HTML backend did not perform sufficient validation during resource handling:

  • Accepted file:// URIs enabling local file system access when enable_local_fetch=True
  • Path resolution allowed traversal outside intended directories via ../ sequences and absolute paths
  • Did not block internal network resources under enable_remote_fetch=True
  • HTTP redirects were not validated, potentially redirecting to unintended schemes
  • No resource limits for remote image downloads and data: URIs
Patches

Fixed in versions 2.91.0 (initial fixes) and 2.94.0 (additional improvements). The fixes implement:

  • Updated local path treatment: absolute files always blocked, relative paths require enable_local_fetch=True (default: False) and containment within configured base_path for path traversal protection
  • file:// scheme stripped & treated as local path (above)
  • IP address validation to prevent SSRF
  • HTTP redirect validation, connection and read timeouts
  • Size limit for both remote images (with streaming download) and base64-decoded data URIs
Workarounds

Keep both enable_local_fetch=False and enable_remote_fetch=False (defaults) when processing untrusted HTML documents.

References

Severity

  • CVSS Score: 7.1 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Docling imports plugin entry points before the allow_external_plugins check

CVE-2026-105745 / GHSA-9jxx-vjrv-h2rq

More information

Details

Summary

allow_external_plugins=False (the default, and the CLI default) is meant to restrict docling to its own model plugins. However, docling's plugin factories call pluggy's load_setuptools_entrypoints(), which imports every module registered under docling's plugin entry-point group. Only afterwards does docling filter out modules outside the docling. namespace. Import-time code in any installed third-party plugin therefore runs even though external plugins are disabled.

Details

In docling/models/factories/base_factory.py, load_from_plugins() loads all entry points first and applies the allow_external_plugins check only to the already-imported modules. The CLI creates these factories when it starts, so running docling imports every registered plugin module. A log message says the plugin "will not be loaded", although its module has already been imported.

Affected configurations

Environments in which a package registering a docling plugin entry point is installed, for example an unvetted or compromised dependency, and which rely on allow_external_plugins=False to keep that code from running.

Impact

Execution of a third-party plugin module's import-time code in the docling process, contrary to the documented behaviour of allow_external_plugins=False.

Patches

Fixed in docling 2.131.0 by #​4413. Plugin entry points are now filtered by module name before they are loaded, so with allow_external_plugins=False third-party plugin modules are no longer imported.

Workarounds

Upgrade to 2.131.0. For older versions:

Only install trusted packages in environments that run docling. Check which packages register docling plugin entry points with importlib.metadata.entry_points().

Severity

  • CVSS Score: 6.7 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Docling: Crafted DoclingDocument JSON embeds local image files into converted output

CVE-2026-105748 / GHSA-p944-4xh2-x776

More information

Details

Summary

docling accepts serialized DoclingDocument JSON as an input format (InputFormat.JSON_DOCLING, enabled by default). A crafted JSON file can set a picture's image uri to a local file path. When the converted document is exported with embedded images (ImageRefMode.EMBEDDED, the CLI default for Markdown and HTML), the referenced file is read and embedded as base64 in the output.

Details

docling/backend/json/docling_json_backend.py validates the JSON into a DoclingDocument without checking image references. The file is then read by docling-core:

  • DoclingDocument._with_embedded_pictures opens file:// and plain-path URIs with PIL.
  • ImageRef.pil_image checks allow_image_file_uri for file:// URIs but not for plain Path values. docling's picture enrichment models load images through this property.

Only files that PIL can decode as an image are disclosed. Other files, such as text files or keys, fail to decode and are not embedded. The different error behaviour does reveal whether a path exists.

Impact

Disclosure of image files readable by the converting process (for example other users' uploads or page images in a shared service), and disclosure of whether a local path exists.

Proof of concept
from pathlib import Path
from docling_core.types.doc import DoclingDocument, ImageRef
from docling_core.types.doc.base import Size

doc = DoclingDocument(name="poc")
doc.add_picture(image=ImageRef(mimetype="image/png", dpi=72, size=Size(width=1, height=1),
                               uri=Path("/srv/uploads/other-user/scan.png")))
doc.save_as_json("poc.json")

docling poc.json --to md embeds the referenced PNG as base64 in poc.md.

Patches

Fixed in docling 2.131.0 by #​4417. The Docling JSON backend now drops image references that point at local files (paths, file: URIs and any scheme other than data: and http(s)) and logs a warning. Callers that need to load local images from JSON they trust can opt in with DoclingJSONFormatOption(backend_options=DeclarativeBackendOptions(enable_local_fetch=True)); the CLI has no such option.

Code that loads untrusted JSON directly with docling-core (DoclingDocument.load_from_json) and exports it with embedded images is not covered by this fix; that part is tracked in docling-core.

Workarounds

Upgrade to 2.131.0. For older versions:

  • Remove InputFormat.JSON_DOCLING from allowed_formats when converting untrusted input.
  • Export with ImageRefMode.PLACEHOLDER or ImageRefMode.REFERENCED instead of EMBEDDED.

Severity

  • CVSS Score: 4.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Docling: Unbounded table rowspan/colspan in HTML, JATS, ODS and BoxNote backends causes CPU/memory exhaustion

CVE-2026-105749 / GHSA-cgc7-9qp3-86m3

More information

Details

Summary

The HTML, JATS, ODS (OpenDocument spreadsheet) and BoxNote backends accept table rowspan / colspan values without an upper bound. A few bytes of input, such as <td rowspan="100000000">, make docling run loops proportional to the declared span and allocate a table grid of the declared size. The result is CPU and memory exhaustion.

Details
  • docling/backend/html_backend.py (_get_cell_spans) parses span attributes with no upper limit. The cell-filling loop then iterates row_span × col_span times.
  • docling/backend/jats_backend.py and docling/backend/boxnote_backend.py fill their tables the same way.
  • The OpenDocument spreadsheet path scans the declared span range.
  • Export (for example export_to_markdown()) materialises the full grid through TableData.grid in docling-core.

document_timeout does not bound this. It is checked between pipeline stages, and these backends convert the whole document in a single call. max_file_size and max_num_pages do not help because the payload is tiny.

Measured on 2.130.0: a 54-byte HTML file with rowspan="1e8" takes about 4.4 s of CPU, and the time grows linearly with the value. A 52-byte file with colspan="3000000" takes about 23 s and reaches 4.5 GB peak memory during Markdown export.

Impact

Denial of service of the converting process from a very small input document. Confidentiality and integrity are not affected.

Proof of concept
<table><tr><td colspan="3000000">x</td></tr></table>
from docling.document_converter import DocumentConverter
DocumentConverter().convert("span.html").document.export_to_markdown()
Patches

Fixed in docling 2.131.0 by #​4414. Table spans are clamped to the HTML limits (colspan 1000, rowspan 65534) and to the actual size of the table in the HTML, JATS, BoxNote and OpenDocument spreadsheet backends, so conversion time and memory grow with the real table only.

Workarounds

Upgrade to 2.131.0. For older versions:

Run conversions of untrusted documents in a separate process with memory and CPU-time limits, or restrict allowed_formats to formats that are not affected.

Severity

  • CVSS Score: 6.5 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

docling-project/docling (docling)

v2.131.0

Compare Source

Feature
Fix
  • pypdfium2: Build the page object index once to avoid quadratic scans (#​4226) (b93af46)
  • pipeline: Skip enrichment after timeout (#​4396) (152f9ba)
  • vlm: Report failed remote API calls as INFERENCE_ERROR instead of empty success (#​4332) (2b2fb85)
  • mets: Enforce the member limit while iterating the archive (#​4412) (ebae65c)
  • plugins: Skip external entry points before importing them (#​4413) (0f443b3)
  • Clamp oversized table rowspan/colspan to the table size (#​4414) (c5b4429)
  • uspto: Extract tables in linear time (#​4411) (19e4519)
  • html: Keep the source text in orig (#​4434) (04e9b04)
  • json: Don't load local image files referenced by Docling JSON input (#​4417) (d4bb776)
  • pptx: Start numbered lists at their startAt value (#​4415) (e478006)
  • ocr: Require enable_remote_services for the KServe v2 OCR engine (#​4418) (7d6d0c4)
  • pptx: Repair test failures introduced by the LibreOffice hardening (#​4425) (98d78ef)
  • asciidoc: Flush pending text at section headers (#​4428) (e2f942e)
  • docx: Keep lists in their section after a numbered heading (#​4282) (68732ff)
  • md: Preserve whitespace around inline emphasis in table cells (#​4318) (d453bb0)
  • epub: Rewrite internal links for every content-document extension (#​4293) (ec3dc7c)
  • latex: Parse tabular*, tabularx and longtable as tables (#​4325) (20f474b)
  • Preserve mixed and numeric chart headers (#​4367) (c14c373)
  • docx: Read footnote/endnote body text from the separate OPC parts (#​4374) (6167240)
  • odf: Stop splicing footnote/endnote body text into the citing paragraph\ ([#&#8203;4375](https://redirect.github.com/docling-project/docling/issues/4375)) ([bf734d1`](bf734d1))
  • uspto: Rewind a stream input before reading it (#​4379) (e100e6d)
  • pptx: Nest list items by paragraph level (#​4397) (fc8a093)
  • asciidoc: Turn listing blocks into code items (#​4400) (8060f3f)
  • docx: Render East Asian w:numFmt values in list markers (#​4336) (2682193)
  • xlsx: Keep every message of a threaded comment (#​4353) (62594ff)
  • asciidoc: Parse nested bullet list items (#​4403) (1d28495)
  • html: Render GFM task lists as checkbox items with their text (#​4401) (4d37c64)
  • md: Keep every character-reference spelling of a pipe inside its table cell (#​4371) (2d5c590)
  • jats: Tolerate partial citation names and empty article titles (#​4272) (25ad1d5)
  • backend: Translate line endings when decoding text from a stream (#​4354) (7928e30)
  • latex: Keep spacing and paragraph of text around inline macros (#​4340) (dcea997)
  • asciidoc: Skip empty tables after incomplete rows (#​4300) (7e361ab)
  • ocr: Use configured Tesseract tessdata path (#​4141) (54a6ca4)
  • csv: Drop blank lines instead of turning them into empty rows (#​4316) (61fe339)
  • Load granite-vision-4.1-4b natively on transformers>=5.8 (#​4208) (804e806)
  • epub: Decode a UTF-16 content document instead of dropping it (#​4351) (cc32d17)
  • ocr: Check ocrmac languages against the configured recognition level (#​4345) (fc4aa7f)
Documentation

v2.130.0

Compare Source

Feature
Fix
  • service client: Omit only unset arguments but keep values set equal to defaults (#​4349) (35c6af5)
  • Remove double preset registration of chart extraction (#​4348) (878831c)
  • md: Honor backslash-escaped pipes in Markdown tables (#​4313) (52e52fd)
  • Fix the VLM end token stripping. Extend the unit tests (7748f6e)
  • docx: Keep list items when a list starts above indent level 0 (#​4188) (b078ea3)
  • backend: Defer the docling-parse import in the PDF backend (#​4286) (1b40928)
  • html: Emit the of a table and link it to the TableItem (#​4289) (d6d9da0)
  • Force eager attention for Nemotron Parse v2 (#​4307) (#​4328) (54c7cf2)
  • ebcdic: Keep fixed-point notation for scaled numbers (#​4296) (244042a)
  • docx: Don't reuse a list group across an intervening table (#​4305) (4141a99)
  • afp: Follow PTOCA control sequence chaining (#​4297) (df6b341)
  • pptx: Record slide positions as TOPLEFT, the origin python-pptx reports (#​4294) (dd05464)
  • office: Harden the LibreOffice profile, flags, and timeout kill (#​4228) (14789f2)
  • docx: Clamp heading levels to the OOXML 1-9 range (#​4319) (1c2dbec)
  • xlsx: Avoid duplicate sparse table fragments (#​4302) (891de07)
  • email: Fall back to the HTML body when the plain part is blank (#​4295) (8e37971)
  • Skip already downloaded EasyOCR models unless force is set (#​4317) (8522eb7)
  • backend: Defer pypdfium2 import in office and LaTeX backends (#​4285) (abca4be)
  • Recognize .markdown files (#​4306) (557f0fa)
Documentation
  • ocr: Fix the dead same-page anchor in OCR.md (#​4310) (6e22317)
  • examples: Fix stale paths in the VLM pipeline example comments (#​4311) (490fa64)

v2.129.0

Compare Source

Feature
Fix
  • More improvements for chandra ocr parsing (#​4277) (a83926c)
  • asciidoc: Recognise a rowspan-only cell specifier (#​4290) (815f34a)
  • html: Default a zero colspan or rowspan to 1 in HTML tables (#​4287) (6cb036c)
  • csv: Wrap strict quote errors as DocumentLoadError (#​4260) (ddf05ff)
  • heading-hierarchy: Support colon, dash, bracket and parenthesized numbering markers (#​4204) (3b5f61c)
  • epub: Resolve manifest hrefs that step out of the package directory (#​4261) (2b6a7ff)
  • backend: Decode text documents that are not UTF-8 (#​4202) (cea4b45)
  • picture-description: Propagate token usage from vlm engine output (#​4250) (629440e)
  • email: Normalise CRLF and lone CR in message bodies (#​4248) (1ceca30)
  • pptx: Keep charts nested in a group when isolating for rendering (#​4232) (e80fa80)
  • cache: Fall back safely when serialize_as_any detects false circular reference (#​4240) (d4fa979)
  • Recognize bare Arabic chapter numbering (#​4179) (b5cfca0)
Documentation
  • Fix notebook links that resolve above docs/ (#​4196) (52137a1)
  • Fix the API-reference relative paths in the confidence scores guide (#​4195) (56a041a)

v2.128.0

Compare Source

Feature
Fix
  • asciidoc: Block titles, picture parenting, skipped headings, and list dedent (#​4171) (7fe1b3c)
  • image: Apply the EXIF orientation when loading image frames (#​4247) (77ab16d)
  • Improve Chandra OCR parsing and preserve document structure (#​4239) (b322564)
  • email: Keep rendered display names parseable and single-line (#​4242) (e8c6092)
  • docx: Sanitize fragment-only relationship targets in DOCX archives before parsing (#​4243) (1aec03f)
Documentation
  • Fix stale TransformersModelType enum member in vision models guide (#​4251) (bbdaeda)

v2.127.0

Compare Source

Feature
Fix
  • html: Flag pivot-table row headers as row_header, not column_header (#​4216) (5ef4f92)
  • jats: Preserve structured abstract sections and fix nested list parent (#​4172) (5eef82b)
  • pptx: Correct paragraph provenance, subtitle labels, and chart caption parenting (#​4190) (1c46705)
  • docx: Parse table cells wrapped in a content control (#​3946) (#​3951) (78caf0a)
  • iwork: Drop mimetypes.add_type workaround for Pages MIME type (#​4215) (636c9d5)
  • epub: Decode percent-escaped manifest hrefs (#​4199) (c35bb02)
  • docx: Avoid per-figure document reload and use bulk body reset (#​4193) (82e6361)
  • webvtt: Accept CRLF and CR line terminators from a stream (#​4157) (3682b16)
  • docx: Honor w:numFmt when building Word list markers (#​4087) (ff764c2)
  • asciidoc: Remove dead max_image_data_base64_bytes option (#​4173) (97f73ef)
  • xlsx: Add missing openpyxl template formats (#​4178) (c34fa4d)
  • iwork: Prune sf:ghost-text-ref placeholder text (#​4170) (025b27c)
Documentation

v2.126.0

Compare Source

Feature
Fix

v2.125.0

Compare Source

Feature
  • Introduce min-version check for VLM engines (fixes chandra-ocr-v2 MLX) (#​4150) (9876e73)
Fix

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (in timezone America/Toronto)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the renovatebot label Sep 8, 2026
@renovate
renovate Bot requested review from a team, gabemontero, maysunfaisal and thepetk as code owners September 8, 2026 14:52
@renovate renovate Bot added the renovatebot label Sep 8, 2026
@renovate
renovate Bot force-pushed the renovate/pypi-docling-vulnerability branch from 4e4006c to 35a4116 Compare September 19, 2026 15:10
@renovate
renovate Bot force-pushed the renovate/pypi-docling-vulnerability branch from 35a4116 to d9afbce Compare September 27, 2026 20:15
@renovate
renovate Bot force-pushed the renovate/pypi-docling-vulnerability branch from d9afbce to 684d6e5 Compare October 15, 2026 00:46
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate
renovate Bot force-pushed the renovate/pypi-docling-vulnerability branch from 684d6e5 to 7128338 Compare October 17, 2026 03:41
@renovate renovate Bot changed the title Update docling to v2.94.0 [SECURITY] Update docling to v2.131.0 [SECURITY] Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants