CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-105748

CVE-2026-105748: Local File Inclusion and Arbitrary File Disclosure in Docling Document Parser

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 8, 2026·5 min read·26 visits

Executive Summary (TL;DR)

Docling is vulnerable to Local File Inclusion via crafted JSON inputs, allowing attackers to read local system images or verify file existence.

A Local File Inclusion (LFI) and Arbitrary File Disclosure vulnerability exists in Docling and Docling Slim versions >= 2.16.0 up to 2.131.0. When parsing serialized DoclingDocument structures using the JSON input format, the backend fails to restrict image URI schemes, allowing remote attackers to retrieve local files and verify path existence on the host system during embedded document export.

Vulnerability Overview

The Docling document conversion library offers capabilities for parsing, structured layout extraction, and format conversions. It supports a declarative input schema via serialized JSON models, identified as the InputFormat.JSON_DOCLING backend. Within this input flow, the parser processes metadata structures including image definitions to rebuild or render document elements.

Historically, the parser accepted remote or local source references within its image schema without restricting the target protocols. This lack of restriction allows untrusted serialized JSON payloads to specify local file paths. Because the system subsequently attempts to access and embed these image references during export, it exposes the host system to Local File Inclusion (LFI).

An attacker can exploit this behavior by passing a crafted JSON document containing arbitrary local system file paths. The impact spans beyond file reading, allowing path validation, file existence mapping, and, under specific conditions, full exfiltration of sensitive graphical or binary files. The vulnerability exposes any deployment where Docling processes untrusted documents on a server-side backend.

Root Cause Analysis

The root cause lies in how Docling resolves asset URI schemes during its export pipeline. When a client imports a document using InputFormat.JSON_DOCLING, the backend deserializes the payload into Pydantic models. Within this model hierarchy, ImageRef objects represent individual images and store their locations in a uri property.

When exporting the parsed document using an embedded image mode (such as ImageRefMode.EMBEDDED), the engine calls internal resolution routines. Specifically, the method DoclingDocument._with_embedded_pictures delegates to ImageRef.pil_image to fetch the source asset. Because the uri property lacked validation filters, it can point directly to local filesystem paths.

The library resolves the path and invokes the Pillow (PIL) library's Image.open method. If the file is a valid image, Pillow reads its binary contents, which are subsequently Base64-encoded and outputted. If the path exists but fails image validation, or does not exist, the server throws specific exceptions. An attacker can analyze these error variations to discover file existence and directories.

Code Analysis

The vulnerability was addressed by introducing input sanitization filters within the JSON ingestion backend. In vulnerable versions, deserialization parsed the model directly and preserved local file paths in the ImageRef.uri fields without verification.

The remediation patch introduces the function _clear_local_image_refs inside docling/backend/json/docling_json_backend.py. This helper recurses down the entire Pydantic object hierarchy to find ImageRef instances. If the schema validator detects an asset URI that does not conform to a whitelisted secure remote scheme, the URI is wiped and set to None.

_KEPT_IMAGE_URI_SCHEMES = frozenset({"data", "http", "https"})
 
def _is_kept_image_uri(uri: AnyUrl | Path) -> bool:
    # Restrict URIs to whitelisted web protocols
    return isinstance(uri, AnyUrl) and uri.scheme.lower() in _KEPT_IMAGE_URI_SCHEMES
 
def _clear_local_image_refs(node: object) -> int:
    cleared = 0
    if isinstance(node, BaseModel):
        for name, value in node:
            if isinstance(value, ImageRef):
                if not _is_kept_image_uri(value.uri):
                    # Strips local files or unapproved schemes by replacing with None
                    setattr(node, name, None)
                    cleared += 1
            else:
                cleared += _clear_local_image_refs(value)
    # Tree-walking continues for list, tuple, and dict structures
    return cleared

This defensive filter blocks local paths from propagating into the core export engines. By applying this logic during initial JSON loading, downstream processes cannot trigger local image rendering.

Exploitation Methodology

Exploitation requires that an application ingest an attacker-controlled JSON file and export it using embedded graphics. Because the attack utilizes standard parser functions, the adversary needs no privileges on the target environment.

An attacker constructs a payload targeting local configurations, keys, or screenshots stored as images on the host filesystem. An example target path is /opt/app/sensitive_system_graphic.png or directories containing readable administrative assets.

{
  "schema_name": "DoclingDocument",
  "version": "1.0.0",
  "name": "Exploit payload",
  "pictures": [
    {
      "image": {
        "mimetype": "image/png",
        "dpi": 72,
        "size": {"width": 100, "height": 100},
        "uri": "/opt/app/sensitive_system_graphic.png"
      }
    }
  ]
}

When the converter processes this file and converts it into markdown with embedded objects, it writes out the Base64 representation of the file. The attacker receives this serialized output, decodes it, and recovers the target image. If non-image files are targeted, the application might return diagnostic error logs that reveal the presence or absence of the files, exposing a secondary path existence verification vulnerability.

Residual Risks and Security Gaps

A major residual risk exists for applications interacting directly with low-level components. The remediation code resides inside the docling high-level backend parser package, rather than the core schema definitions of docling-core.

If a developer ingests JSON directly using DoclingDocument.model_validate_json or similar schema-level methods in docling-core, the input sanitization filters are completely bypassed. Because the core library is unpatched, downstream pipelines operating directly on the schema remain vulnerable to the same local file exposure vector.

Additionally, the default protocol whitelist permits http and https schemas. This configuration exposes the server to Server-Side Request Forgery (SSRF) threats. An attacker can reference internal addresses or metadata endpoints, causing the host server to fetch local sensitive details or probe internal networks.

http://169.254.169.254/latest/meta-data/

Lastly, parser inconsistencies between Pydantic's AnyUrl parsing and the operating system's file resolver could lead to bypasses. For instance, Windows UNC paths or local administrative paths might elude the standard scheme filters but still trigger file access when handled by Python's underlying file APIs.

Fix Analysis (1)

Technical Appendix

CVSS Score
4.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
EPSS Probability
0.22%
Top 89% most exploited

Affected Systems

docling-project/doclingdocling-project/docling-slim

Affected Versions Detail

Product
Affected Versions
Fixed Version
docling
docling-project
>= 2.16.0, < 2.131.02.131.0
docling-slim
docling-project
>= 2.16.0, < 2.131.02.131.0
AttributeDetail
CWE IDCWE-73 (External Control of File Name or Path)
Attack VectorNetwork
CVSS Score4.3 (Medium)
EPSS Score0.00218
ImpactLow Confidentiality (Local File Inclusion / Path Probing)
Exploit StatusPoC / Non-weaponized
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
T1552Unsecured Credentials
Credential Access
CWE-73
External Control of File Name or Path

The software allows user input to control paths or filenames, leading to unauthorized access to local filesystem resources.

References & Sources

  • [1]GitHub Security Advisory
  • [2]Official Fix Commit
  • [3]Official Pull Request
  • [4]Release Notes (v2.131.0)
  • [5]National Vulnerability Database (NVD)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-62683
3.1

CVE-2026-62683: Incorrect Authorization via Stale Public Shares in File Browser

File Browser versions prior to 2.63.17 contain an authorization and state-management flaw in the BoltDB storage backend. When an authenticated user deletes a shared directory via an HTTP request with a trailing slash (e.g., DELETE /api/resources/a/), the share cleanup routine queries the database index using the unnormalized path before stripping the trailing slash. Because canonical share paths are stored without trailing slashes (e.g., /a), the database prefix query fails to match the parent directory share record. If a directory with the same name is later recreated, the dormant public share hash automatically reactivates and exposes the new directory contents to unauthenticated users.

Alon Barad
Alon Barad
1 views•10 min read
•about 2 hours ago•CVE-2026-62297
7.5

CVE-2026-62297: Uncontrolled Memory Allocation and Denial of Service in ag-psd

An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
3 views•12 min read
•about 4 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
6 views•12 min read
•about 5 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
5 views•10 min read
•about 6 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read