Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105748 Overview
CVE-2026-105748 is an information disclosure vulnerability in Docling, a document processing library that parses diverse formats and integrates with the generative AI ecosystem. The flaw affects the InputFormat.JSON_DOCLING backend in docling/backend/json/docling_json_backend.py. Versions from 2.16.0 up to (but not including) 2.131.0 fail to reject picture image references containing local paths or file:// URIs in serialized DoclingDocument input. Attackers can craft malicious JSON documents that cause Docling to read local image files from the host when the document is enriched or exported with ImageRefMode.EMBEDDED. The issue is classified under CWE-73 (External Control of File Name or Path) and is fixed in version 2.131.0.
Critical Impact
A crafted Docling JSON document can cause the processing host to read and embed arbitrary local image files into Markdown or HTML output, disclosing file contents and existence to the attacker.
Affected Products
- Docling versions 2.16.0 through 2.130.x
- Applications using the InputFormat.JSON_DOCLING backend
- Pipelines invoking DoclingDocument._with_embedded_pictures or ImageRef.pil_image on untrusted input
Discovery Timeline
- 2026-10-05 - CVE-2026-105748 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-105748
Vulnerability Analysis
Docling deserializes DoclingDocument instances from JSON through its JSON_DOCLING backend. The backend validates document structure but does not restrict the URI schemes allowed inside ImageRef fields. An attacker-supplied document can therefore reference file:///etc/passwd.png, /var/log/secret.jpg, or any other local path reachable by the Docling process.
When downstream code calls DoclingDocument._with_embedded_pictures or ImageRef.pil_image, Pillow opens the referenced path and returns the decoded bytes. The export routine then base64-encodes those bytes into Markdown or HTML output. The attacker retrieves local file contents whenever that output is returned, logged, or forwarded.
Disclosure is bounded by what Pillow can decode as an image. Beyond direct content disclosure, differing decode behavior for valid images, invalid images, and missing files allows an attacker to infer whether arbitrary paths exist on the host.
Root Cause
The docling_json_backend.py module trusted every ImageRef URI present in incoming JSON. There was no allow-list of safe URI schemes and no rejection of local filesystem paths. Any scheme accepted by pydantic.AnyUrl or any pathlib.Path value survived validation and was later resolved against the local filesystem.
Attack Vector
Exploitation requires an application that ingests untrusted Docling JSON and subsequently enriches or exports the resulting document with embedded images. User interaction is required because a victim must supply or process the malicious document. No authentication is required against the vulnerable code path itself.
The following patch excerpt shows the introduction of an allow-list for safe URI schemes and a helper that clears local image references before processing:
import codecs
import logging
from io import BytesIO
from pathlib import Path
from typing import Optional, Union
from docling_core.types.doc import DoclingDocument, ImageRef
from pydantic import AnyUrl, BaseModel
from typing_extensions import override
from docling.backend.abstract_backend import DeclarativeDocumentBackend
from docling.datamodel.backend_options import BackendOptions
from docling.datamodel.base_models import InputFormat
from docling.datamodel.document import InputDocument
_log = logging.getLogger(__name__)
_KEPT_IMAGE_URI_SCHEMES = frozenset({"data", "http", "https"})
def _is_kept_image_uri(uri: AnyUrl | Path) -> bool:
return isinstance(uri, AnyUrl) and uri.scheme.lower() in _KEPT_IMAGE_URI_SCHEMES
def _clear_local_image_refs(node: object) -> int:
"""Set every ``ImageRef`` field below ``node`` whose URI is local to ``None``."""
Source: Docling commit d4bb776
Detection Methods for CVE-2026-105748
Indicators of Compromise
- Docling JSON documents containing ImageRef entries with file:// URIs or absolute local paths such as /etc/, /root/, or C:\\Users\\
- Rendered Markdown or HTML output from Docling containing base64-embedded images that correspond to non-image local files on the processing host
- Pillow decode errors in Docling logs that correlate with external-sourced JSON submissions
Detection Strategies
- Scan incoming DoclingDocument JSON payloads for uri or path fields whose scheme is not data, http, or https
- Monitor the Docling process for file reads outside its designated working directory, especially under /etc, user home directories, and credential stores
- Review export artifacts for unexpectedly large or structurally invalid embedded images that suggest coerced reads of non-image files
Monitoring Recommendations
- Enable audit logging on hosts running Docling and alert on reads of sensitive files by the Python interpreter running the library
- Track installed Docling versions across build and runtime environments and flag any instance below 2.131.0
- Correlate inbound document submissions with downstream file access using endpoint telemetry
How to Mitigate CVE-2026-105748
Immediate Actions Required
- Upgrade Docling to version 2.131.0 or later in all services that process untrusted JSON input
- Audit application code paths that call DoclingDocument._with_embedded_pictures or ImageRef.pil_image on externally supplied documents
- Rotate any secrets that may have been readable by the Docling process if exploitation is suspected
Patch Information
The fix is delivered in Docling 2.131.0 via pull request #4417 and commit d4bb776. The patch introduces _KEPT_IMAGE_URI_SCHEMES restricting accepted URI schemes to data, http, and https, and adds _clear_local_image_refs to strip local image references during JSON ingestion. Full details are in the GitHub Security Advisory GHSA-p944-4xh2-x776.
Workarounds
- If immediate upgrade is not possible, pre-process incoming JSON to remove any ImageRef entries whose URI scheme is not data, http, or https
- Run Docling under a dedicated, unprivileged user account with filesystem access restricted to the input and output directories
- Avoid invoking ImageRefMode.EMBEDDED export on documents originating from untrusted sources
- Note that direct untrusted loading through docling-core is outside the scope of this Docling fix and requires independent hardening
# Upgrade to the patched release
pip install --upgrade "docling>=2.131.0"
# Verify the installed version
python -c "import docling; print(docling.__version__)"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

