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-112310 Overview
CVE-2026-112310 is a local file disclosure vulnerability in docling-core, a Python library used to parse and serialize document structures for the Docling document processing project. Affected versions 2.5.0 through 2.102.x permit attackers to read local image files by supplying plain filesystem paths in ImageRef URIs, bypassing the allow_image_file_uri gate. When a crafted DoclingDocument JSON or YAML is exported with ImageRefMode.EMBEDDED or rendered to HTML, the library embeds readable local image files as base64 and reveals path existence to the attacker. The flaw is classified as improper external control of file name or path [CWE-73].
Critical Impact
Attackers who can submit crafted documents to a service using docling-core can exfiltrate arbitrary local image files and probe the filesystem for the existence of specific paths.
Affected Products
- docling-core versions 2.5.0 through 2.102.0
- Applications embedding docling-core for DoclingDocument deserialization
- Pipelines that export documents using ImageRefMode.EMBEDDED or HTML rendering
Discovery Timeline
- 2026-10-19 - CVE-2026-112310 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-112310
Vulnerability Analysis
The vulnerability resides in how docling-core resolves the uri field of an ImageRef object. The uri field accepts either AnyUrl or Path, and the library includes a setting called allow_image_file_uri meant to gate access to local images referenced through file:// URIs. However, the resolution logic did not gate plain filesystem paths with the same setting, so an attacker-supplied Path value could be opened directly.
When a DoclingDocument containing a crafted ImageRef is deserialized and then exported with ImageRefMode.EMBEDDED or rendered to HTML, the library reads the referenced local file, decodes it as an image through PILImage.open, and embeds the content as a base64-encoded data URI in the output. The attacker then retrieves file contents through the generated artifact. Even for files that cannot be decoded as images, differentiated error behavior leaks path existence.
Root Cause
The allow_image_file_uri setting only checked URIs with the file scheme. Plain Path values and ambiguous strings coerced into Path by Pydantic's left-to-right union resolution bypassed the gate entirely, allowing unrestricted local image reads during deserialization and export.
Attack Vector
Exploitation requires an attacker to submit a crafted DoclingDocument to an application that deserializes untrusted input and then exports or renders it. User interaction is required to trigger the export step. The attacker controls the uri field of embedded ImageRef entries, pointing at any readable image file on the host.
# Security patch in docling_core/types/doc/common/reference.py
# Introduces explicit local-path handling gated by settings
uri: AnyUrl | Path = Field(union_mode="left_to_right")
_pil: PILImage.Image | None = None
def _local_path(self) -> Path | None:
"""Return the local filesystem path of a file:// or plain path URI, else None."""
if isinstance(self.uri, Path):
return self.uri
if isinstance(self.uri, AnyUrl) and self.uri.scheme == "file":
return Path(unquote(str(self.uri.path)))
return None
def _load_local_image(self, base_dir: Path | None = None) -> None:
"""Read a local image into memory, without the settings check.
Only for explicit opt-ins, see ``DoclingDocument.load_local_images``.
"""
if self._pil is not None or (local_path := self._local_path()) is None:
return
if base_dir is not None:
local_path = base_dir / local_path
if not local_path.is_file():
raise ValueError(f"Image file not found or not a regular file: {local_path}")
_ensure_within_size_limit(
local_path,
max_size=settings.max_image_decoded_size,
label="Image file",
)
with PILImage.open(local_path) as pil:
self._pil = pil.copy()
Source: GitHub commit f952fc5
Detection Methods for CVE-2026-112310
Indicators of Compromise
- Inbound DoclingDocument JSON or YAML payloads containing ImageRef entries whose uri field is a plain filesystem path such as /etc/, C:\\, or ..-relative paths rather than an http(s):// URL.
- Exported HTML or embedded-mode documents containing base64 image data derived from unexpected local paths such as application configuration or user profile directories.
- Application exceptions originating from PILImage.open on non-image local files, which can indicate probing for path existence.
Detection Strategies
- Inspect application logs for docling-core deserialization and export operations acting on untrusted input, correlating with ImageRef URIs that resolve to local paths.
- Add input validation telemetry that records any ImageRef.uri value matching a Path instance or non-http(s) scheme before export.
- Compare installed docling-core version against 2.103.0 across your Python environments and container images.
Monitoring Recommendations
- Monitor outbound responses from services that return rendered documents for anomalously large base64 payloads not sourced from user-submitted images.
- Alert on filesystem reads performed by Python processes running docling-core against paths outside the designated document working directory.
How to Mitigate CVE-2026-112310
Immediate Actions Required
- Upgrade docling-core to version 2.103.0 or later across all services, build pipelines, and container images.
- Audit application code paths that call DoclingDocument deserialization followed by export with ImageRefMode.EMBEDDED or HTML rendering, and reject untrusted input until patched.
- Confirm that the allow_image_file_uri setting remains disabled by default and only enabled for trusted, local-only workflows.
Patch Information
The fix is delivered in docling-core v2.103.0 via Pull Request #900 and commit f952fc5. The patch gates all local image reads behind the allow_image_file_uri setting, including plain Path values, and introduces an explicit load_local_images opt-in. Additional context is provided in the GitHub Security Advisory GHSA-jx5c-6gmw-72m3 and the VulnCheck advisory.
Workarounds
- Reject or sanitize any ImageRef.uri field that is not an http:// or https:// URL before passing documents to docling-core.
- Run docling-core processing in a sandboxed environment or container with a read-only filesystem view limited to the document working directory.
- Avoid calling ImageRefMode.EMBEDDED export or HTML rendering on documents sourced from untrusted users until the upgrade is complete.
# Upgrade docling-core to the patched release
pip install --upgrade "docling-core>=2.103.0"
# Verify the installed version
python -c "import docling_core, importlib.metadata as m; print(m.version('docling-core'))"
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

