Repository navigation
chore(deps): update dependency docling to v2.132.0 [security] - #36
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate
Bot
force-pushed
the
renovate/pypi-docling-vulnerability
branch
from
October 27, 2026 00:34
536e81c to
17a140e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
2.98.0→2.132.0Docling:
enable_local_fetchis not enforced in HTML browser-rendering modeCVE-2026-105750 / GHSA-q43m-vhcp-mhvm
More information
Details
Summary
When the HTML backend renders pages in a headless browser (
HTMLBackendOptions(render_page=True)), theenable_local_fetchoption is not enforced. A crafted HTML file can embed an arbitrary local file (for example with<iframe src="file:///...">), and that file's contents appear in the page image attached to the returnedDoclingDocument.Details
In render mode, Playwright requests are filtered by
HTMLDocumentBackend._get_browser_request_block_reason. In affected versions, this check allowedfile:URLs unconditionally, before reading any option. As a result:enable_local_fetch=Falsedid not block local file access, andenable_local_fetch=True, file access was not limited to the source document's directory, unlike the non-render path (ImageResourceLoader), which rejects absolute paths and path traversal.Versions 2.82.0–2.90.x did no request filtering in render mode at all.
The browser runs with JavaScript disabled (from 2.91.0), so disclosure is passive: only what Chromium renders visibly inside the page viewport ends up in the page image.
Only
Pathinputs are affected. They are loaded through afile://URL. Stream inputs are loaded withpage.set_content()into an opaque origin, from which Chromium does not loadfile://subresources.Impact
An attacker who can submit HTML for conversion can read any text file the conversion process can read (for example
.envfiles, credential files, or other users' documents on a shared host) by having it rendered into the page image.Only applications that meet all of these conditions are affected:
HTMLBackendOptions(render_page=True)in Python,playwrightdependency installed, andPath.The following are not affected: the default configuration (
render_page=False), thedoclingCLI,docling-serve, and the EPUB, Markdown, XBRL and email backends.Patches
Fixed in 2.118.1 (#3948). In render mode,
file:requests are now blocked unlessenable_local_fetch=True, and allowed requests are limited to the source document's directory.Workarounds
If you can't upgrade, don't use
render_page=Trueon untrusted HTML, or pass the input as a stream instead of aPath.Credits
Reported by @priyankn.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Docling: METS-GBS archive member limit enforced after full member enumeration (memory exhaustion during format detection)
CVE-2026-105747 / GHSA-3cr3-8m4c-fpxw
More information
Details
Summary
When docling detects the input format of a gzip-compressed tar archive (METS-GBS), and later when the METS-GBS backend opens it, it calls
tarfile.TarFile.getmembers(). That builds the full member list in memory before themax_member_countlimit is checked. A small archive with a very large number of empty members therefore makes docling allocate memory in proportion to the member count, and the limit has no effect.Details
docling/datamodel/document.py(format detection) anddocling/backend/mets_gbs_backend.pyboth iteratetar.getmembers()and count members inside the loop.getmembers()reads every header up front.Measured on Python 3.12: an archive of 1,000,000 empty members compresses to about 6.2 MB and makes
getmembers()hold about 408 MB (about 66 times the input size). Format detection runs for anyapplication/gzipinput beforeallowed_formatsis applied, so the allocation happens even when METS-GBS is not an allowed format.This check was introduced by the fix for CVE-2026-44018 (GHSA-r3xg-rg9j-67fv) in 2.91.0. The eager enumeration it relies on has been there since METS-GBS detection was added in 2.45.0.
Impact
Memory exhaustion of the converting process, proportional to the size of the input archive. Confidentiality and integrity are not affected.
Patches
Fixed in docling 2.131.0 by #4412. Format detection and the METS-GBS backend now read archive members one at a time and stop as soon as
max_member_countis exceeded, including when looking up page files.Workarounds
Upgrade to 2.131.0. For older versions:
Reject gzip or tar inputs before they reach docling when METS-GBS support is not needed, and run conversions of untrusted input with memory limits.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:LReferences
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'sload_setuptools_entrypoints(), which imports every module registered under docling's plugin entry-point group. Only afterwards does docling filter out modules outside thedocling.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 theallow_external_pluginscheck only to the already-imported modules. The CLI creates these factories when it starts, so runningdoclingimports 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=Falseto 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=Falsethird-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:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:HReferences
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/colspanvalues 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 iteratesrow_span × col_spantimes.docling/backend/jats_backend.pyanddocling/backend/boxnote_backend.pyfill their tables the same way.export_to_markdown()) materialises the full grid throughTableData.gridin docling-core.document_timeoutdoes not bound this. It is checked between pipeline stages, and these backends convert the whole document in a single call.max_file_sizeandmax_num_pagesdo 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 withcolspan="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
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_formatsto formats that are not affected.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HReferences
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
DoclingDocumentJSON as an input format (InputFormat.JSON_DOCLING, enabled by default). A crafted JSON file can set a picture's imageurito 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.pyvalidates the JSON into aDoclingDocumentwithout checking image references. The file is then read by docling-core:DoclingDocument._with_embedded_picturesopensfile://and plain-path URIs with PIL.ImageRef.pil_imagechecksallow_image_file_uriforfile://URIs but not for plainPathvalues. 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
docling poc.json --to mdembeds the referenced PNG as base64 inpoc.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 thandata:andhttp(s)) and logs a warning. Callers that need to load local images from JSON they trust can opt in withDoclingJSONFormatOption(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:
InputFormat.JSON_DOCLINGfromallowed_formatswhen converting untrusted input.ImageRefMode.PLACEHOLDERorImageRefMode.REFERENCEDinstead ofEMBEDDED.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Docling has arbitrary file read/write (and command execution when shell-escape is enabled) when rendering untrusted TikZ with the opt-in Tectonic engine
CVE-2026-105744 / GHSA-x3q2-h9hx-4r4j
More information
Details
Summary
When the LaTeX backend is configured to render TikZ pictures with the Tectonic engine (
LatexBackendOptions(tikz_engine="tectonic")), the TikZ body and the document preamble from the input file are compiled by Tectonic without any restriction on TeX's file primitives. A crafted.texfile can read files the process can read and write files at paths the process can write. If the caller also setstikz_engine_allow_shell_escape=True, the document can run shell commands through\write18.Details
docling/backend/latex/engines/tectonic.pywrites the picture source into a temporary document and runs thetectonicbinary on it._resolve_local_dependencyonly decides which files are staged into the temporary directory. It does not limit what TeX opens at compile time, so:\input{/abs/path},\verbatiminput{...}and\openinread arbitrary files, and their content can be typeset into the rendered picture that ends up in the conversion output. For an in-memoryDocumentStream, staging is skipped entirely.\immediate\openout/\writecreate or overwrite files outside the temporary directory. Neither needs shell escape. Tectonic's--untrustedflag does not block them either.Separately, the
TectonicEngineconstructor defaults toallow_shell_escape=True. The LaTeX backend always passestikz_engine_allow_shell_escapeexplicitly (defaultFalse), so this default only affects code that instantiatesTectonicEnginedirectly.Affected configurations
tikz_engine="tectonic", have atectonicbinary available (onPATHor in the docling cache), and convert untrusted LaTeX.tikz_engine=None). docling does not installtectonicautomatically, and the CLI exposes no option to enable it.Impact
Disclosure of local files readable by the process, and creation or overwrite of files writable by the process. Writing to startup or configuration files can lead to code execution. With shell escape enabled, commands run directly.
Proof of concept
Converting this file with
LatexBackendOptions(tikz_engine="tectonic")creates/tmp/docling-tectonic-poc.txt.Patches
Mitigated in docling 2.132.0 by #4419:
TectonicEnginenow defaults toallow_shell_escape=False, and without shell escape Tectonic runs with--untrustedand--only-cached.\openin,\openout,\XeTeXpicfileor\XeTeXpdffileprimitives, or names an absolute, home, drive-letter or parent-directory path in\input,\include,\includegraphics,\InputIfFileExistsor\graphicspath.This check is best-effort. It reads the source text, and TeX can open files in ways a text check cannot see, for example through package commands or names built by macros. As documented in the pipeline options reference, untrusted LaTeX rendered with
tikz_engine="tectonic"should still be processed in an isolated environment.Workarounds
Upgrade to 2.132.0. For older versions:
tikz_engine="tectonic"for untrusted input, or run the conversion in an OS-level sandbox (container, no host mounts, read-only filesystem, no network).tikz_engine_allow_shell_escape=Truefor untrusted input.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Docling has SSRF guard bypass in remote resource fetching (DNS rebinding / multi-record resolution; no IP validation in HTML render mode)
CVE-2026-105743 / GHSA-pc36-qwjq-x68c
More information
Details
Summary
When remote fetching is enabled (
enable_remote_fetch=True, together withfetch_images=Trueor HTMLrender_page=True), docling's protection against requests to private and loopback addresses can be bypassed.http://127.0.0.1:8080\@1.1.1.1/x.png, the check validates1.1.1.1while the HTTP client connects to127.0.0.1:8080.render_page=True), requests made by the page are allowed for anyhttp(s)URL without an IP check.Details
validate_url_safetyindocling/backend/utils/image_resource_loader.pycallssocket.gethostbyname(), which returns one IPv4 address. It checks that address and then passes the original URL string torequests, which parses it again with urllib3 and resolves the name independently throughgetaddrinfo.urllib.parsetreats a backslash in the authority as part of the host section, while urllib3 ends the authority there, so the two can pick different hosts. This loader is shared by the HTML, Markdown, AsciiDoc, OpenDocument and JATS backends.docling/backend/html_backend.pyroutes browser requests in render mode. Whenenable_remote_fetchis set, it continues anyhttp(s)request, including iframes and images, without resolving or checking the destination.JavaScript is disabled during rendering, so the browser path can only show internal responses passively in the page screenshot. It cannot read them and send them elsewhere.
Affected configurations
enable_remote_fetch(CLI:--html-image-fetch remoteorall) and process untrusted documents.enable_remote_fetch=False).The main-URL fetch for
DocumentConverter.convert("https://...")is implemented in docling-core and is tracked there.Impact
Requests from the converting host to internal services such as cloud metadata endpoints and loopback services. Response content is exposed only when it decodes as an image or is rendered into the page screenshot.
Patches
Fixed in docling 2.132.0 by #4420. The image loader now resolves the host once, requires every resolved address (IPv4 and IPv6, including IPv4-mapped, 6to4 and NAT64 forms) to be globally routable, and connects to one of the validated addresses, using the same parsed host for the check and the connection. Remote requests made during HTML browser rendering are downloaded by the same loader, and the browser itself stays offline. When a proxy is configured through environment variables, requests go through the proxy, which is then responsible for filtering destinations.
Workarounds
Upgrade to 2.132.0. For older versions:
Keep
enable_remote_fetch=Falsefor untrusted documents, or block egress to private, link-local and loopback ranges at the network level.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Docling: Configured HTTP headers sent to every remote image host named by a document
CVE-2026-105742 / GHSA-p3fw-7699-7926
More information
Details
Summary
HTMLBackendOptions.headersis documented for passing authentication headers (API keys, bearer tokens) when fetching remote images. docling sends these headers on every remote image request, to whichever host the document names. An untrusted document that references an attacker-controlled image URL receives the caller's credentials.Details
docling/backend/utils/image_resource_loader.pymergesoptions.headersinto each remote request without checking the destination against the source document's origin.requestsstrips onlyAuthorizationon a cross-host redirect, so custom headers such asX-API-KeyorCookieare also forwarded across redirects.Affected configurations
headerstogether withenable_remote_fetch=Trueandfetch_images=True(CLI:--html-image-headerswith--html-image-fetch remoteorall), and convert untrusted HTML.Impact
Disclosure of the configured request headers, typically credentials, to a host chosen by the document author.
Proof of concept
Converting this file with
HTMLBackendOptions(enable_remote_fetch=True, fetch_images=True, headers={"X-API-Key": "..."})sends the key toattacker.example.Other items from the original report (DNS validation and unvalidated browser requests) are tracked in GHSA-pc36-qwjq-x68c.
Patches
Fixed in docling 2.132.0 by #4420. Configured headers are now sent only to the origin of the source document, checked on every redirect hop, and no longer to other hosts named by the document.
Workarounds
Upgrade to 2.132.0. For older versions:
Do not set
headerswhen converting untrusted documents, or use credentials that are valid only for the intended host and have no other value.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
docling-project/docling (docling)
v2.132.0Compare Source
Feature
42de1e2)Fix
20ba847)d6f0307)bf836f2)cd05bef)6864fb3)e53ce5d)ae8db9a)38b6fa0)5e46913)efaf9ed)v2.131.0Compare Source
Feature
9da6935).key) support (#4330) (87c6ea0)Fix
b93af46)152f9ba)2b2fb85)ebae65c)0f443b3)c5b4429)19e4519)04e9b04)d4bb776)e478006)7d6d0c4)98d78ef)e2f942e)68732ff)d453bb0)ec3dc7c)20f474b)c14c373)6167240)\ ([#​4375](https://redirect.github.com/docling-project/docling/issues/4375)) ([bf734d1`](bf734d1))e100e6d)fc8a093)8060f3f)2682193)62594ff)1d28495)4d37c64)2d5c590)25ad1d5)7928e30)dcea997)7e361ab)54a6ca4)61fe339)804e806)cc32d17)fc4aa7f)Documentation
eb17f57)e207804)3d4c553)v2.130.0Compare Source
Feature
9a2c3e7)Fix
35c6af5)878831c)52e52fd)7748f6e)b078ea3)1b40928)d6d9da0)54c7cf2)244042a)4141a99)df6b341)dd05464)14789f2)1c2dbec)891de07)8e37971)8522eb7)abca4be)557f0fa)Documentation
6e22317)490fa64)v2.129.0Compare Source
Feature
0e6c2ca)e689393)Fix
a83926c)815f34a)6cb036c)ddf05ff)3b5f61c)2b6a7ff)cea4b45)629440e)1ceca30)e80fa80)d4fa979)b5cfca0)Documentation
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.