Local image file disclosure in docling-project docling-core

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-112310?

CVE-2026-112310 is a vulnerability classified as External Control of File Name or Path, affecting docling-core (affected versions: 2.5.0 – < 2.103.0). This vulnerability is rated Medium, with a CVSS score of 5.3. Current sources do not report this vulnerability as exploited.

Overview

Original source data

docling-core 2.5.0 before 2.103.0 contains a local file disclosure vulnerability that allows attackers to read local images by supplying plain filesystem paths in ImageRef URIs, bypassing the allow_image_file_uri gate. Attackers can submit crafted DoclingDocument JSON or YAML that, when exported with ImageRefMode.EMBEDDED or rendered to HTML, embeds readable local image files as base64 and reveals path existence.

Affected products and scope

  • docling-core from 2.5.0 through 2.102.0 is affected according to the project advisory and normalized record.
  • docling-core 2.103.0 is identified as the patched release.
  • The status of versions or parallel branches outside this stated range is not established by the available evidence.

Technical details

docling-project docling-core allows ImageRef.uri to contain either a local filesystem path or a file:// URI. In affected code, ImageRef.pil_image opened a Path value without checking allow_image_file_uri, while _with_embedded_pictures could also open both file:// URIs and plain paths directly during embedded-image processing. An attacker controls the contents of a DoclingDocument JSON or YAML file and supplies it to an application that loads, processes, exports, or renders its images; if the process can read the selected image, the image content can be placed in the output as base64. Error messages could also reveal whether a path exists. The weakness is classified as CWE-73; only files that PIL can decode as images are identified as discloseable, while the surrounding application, authorization model, and output-delivery path remain deployment-specific.

Exploitability

In a deployment that accepts DoclingDocument JSON or YAML from network clients, an attacker can submit a crafted document without separate authentication privileges if the service actually loads and processes it. Exploitation requires the application or a user-driven workflow to perform image processing, embedded-image export, or document rendering, so submission alone does not establish that a file was read. The supplied record identifies no public exploit, and the available evidence does not establish exploitation in the wild. Whether the resulting output is returned directly to the submitter depends on the integrating application.

Technical impact

An attacker can cause docling-core to open an image at a path supplied through document content, then place the readable image into an output as embedded data or disclose whether the path exists. The exposed file must both be readable by the process and be in a format that PIL can decode. The primary impact is loss of image confidentiality and filesystem path-information leakage; the record does not establish an effect on integrity or availability. Real-world consequences depend on whether the integrating application loads untrusted JSON/YAML, performs an export or rendering operation, and returns the result to the submitter.

Business impact

A service that processes user-supplied documents could unintentionally place local images into an export or returned HTML document, exposing data readable by the service account. Path-existence disclosure could provide additional information about the host filesystem and local data locations. The practical consequence depends on the process's read permissions, the images stored on the host, and whether the application returns generated output to the submitting party. The available evidence describes image disclosure and path-existence leakage, not file modification, code execution, or service disruption.

Remediation

  1. Upgrade docling-core to the exact patched release 2.103.0.
  2. If an upgrade is not possible, do not process DoclingDocument JSON or YAML from untrusted sources. The project advisory recommends stripping or validating image uri fields before loading the document.
  3. For trusted documents that genuinely require local image reads, use an intentional opt-in through DOCLINGCORE_ALLOW_IMAGE_FILE_URI=true, or use DoclingDocument.load_from_json(..., allow_local_images=True) or DoclingDocument.load_local_images().
  4. Review the service account's filesystem read permissions and ensure remote document-processing paths do not unintentionally enable local-path reads. Enabling the opt-in for untrusted documents can restore the condition that leads to the vulnerability.

Detection

  1. Inventory environments that use docling-core, especially services that accept or load DoclingDocument JSON/YAML from untrusted sources.
  2. Identify image-processing paths such as get_image(), embedded or referenced image exports, save_as_*, HTML rendering, and page-image or picture-crop processing.
  3. Inspect document data for ImageRef.uri values containing plain filesystem paths or file:// URIs, and determine whether those values are user-controlled.
  4. Review allow_image_file_uri, the DOCLINGCORE_ALLOW_IMAGE_FILE_URI environment variable, and document-loading calls that enable allow_local_images=True; assess these opt-ins together with the document's trust boundary.
  5. Review image-processing errors and generated output for unexpected local paths or image content. This is precautionary review, not a confirmed IOC; absence of errors or unusual output does not prove that a system is safe.
Sources (13)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.