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-105744

CVE-2026-105744: Arbitrary File Read and Remote Code Execution in Docling Tectonic Engine

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 8, 2026·7 min read·42 visits

Executive Summary (TL;DR)

A high-severity vulnerability in Docling's optional Tectonic rendering engine allows remote attackers to read arbitrary files, overwrite critical server assets, or execute arbitrary commands via crafted LaTeX inputs containing malicious TikZ macros.

Docling, a tool for parsing and processing diverse document formats, is vulnerable to arbitrary file read, arbitrary file write, and potential remote code execution (RCE) in versions 2.94.0 through 2.131.0. The vulnerability occurs when applications configure Docling to use the Tectonic engine for rendering TikZ diagrams into images. Because the compilation did not restrict hazardous TeX primitives or sandbox the environment, an attacker can supply crafted documents containing malicious TikZ definitions to access or modify local files and execute arbitrary commands under the privileges of the processing application.

Vulnerability Overview

The vulnerability tracked as CVE-2026-105744 resides within the document rendering functionality of Docling, a document processing library used in generative artificial intelligence ingestion pipelines. Specifically, the flaw exists within the component handling LaTeX rendering of TikZ diagrams. When an application opts into utilizing the Tectonic compilation engine, the process compiles arbitrary LaTeX inputs without sufficient isolation or restriction of hazardous TeX primitives. This failure enables unauthenticated remote attackers to execute arbitrary system commands, disclose local files, and modify local file paths.

Tectonic is integrated into Docling to provide high-quality rasterization and vector rendering of mathematical and structural TikZ blocks contained within parsed documents. However, compile-time components within TeX engines historically possess robust capabilities to read and write physical files to maintain compatibility with legacy TeX document structures. When Docling invokes the Tectonic engine, these capabilities remain active by default, exposing the local system hosting the converter process to complete compromise if the input sources originate from untrusted users.

The attack surface is localized to endpoints that ingest documents and render TikZ objects. By submitting a crafted document containing a malicious TikZ macro block, an attacker triggers the Tectonic compiler on the server. The execution occurs with the privileges of the parent Python process, allowing the attacker to interact directly with the local operating system.

Root Cause Analysis

The primary security flaw stems from the insecure default configuration and lack of sandboxing during the compilation of LaTeX documents via the Tectonic engine. Tectonic, like classical engines such as pdfTeX or XeTeX, implements built-in commands designed to interact with the host filesystem. Specifically, the file stream primitives \openin and \openout allow documents to establish input and output file descriptors on the local disk. Additionally, standard LaTeX commands like \input, \include, and \includegraphics let the engine reference external assets, leading to arbitrary path traversal if the inputs are not restricted.

In vulnerable versions of Docling, specifically versions between 2.94.0 and 2.132.0, the TectonicEngine in docling/backend/latex/engines/tectonic.py is initialized with the option allow_shell_escape=True by default. Under this configuration, the Tectonic process is executed with the command-line flag -Z shell-escape enabled. This flag permits the execution of the standard TeX \write18 primitive, which functions as a system shell command execution engine. Any shell utility requested through a \write18 macro is immediately invoked on the underlying server.

Because the Tectonic process was executed without the --untrusted constraint, the engine operated without file search limitations. Furthermore, there was no pre-validation of the raw LaTeX or TikZ blocks. This allowed raw inputs containing malicious primitives to be directly compiled, granting the compiler authorization to read any file the current operating system user had access to, write arbitrary payloads to writable directories, or execute arbitrary system utilities if shell escape was active.

Code Analysis

The official security patch introduced two critical defense layers to remediate the vulnerability. The first layer modifies the process creation arguments to enforce strict execution boundaries via the Tectonic binary CLI. The second layer introduces a static analysis filter using regular expressions to block known unsafe primitives before the compiler is invoked.

The vulnerable implementation of _build_command in docling/backend/latex/engines/tectonic.py did not restrict local file paths or external network requests. The patch refactored this function to implement strict isolation when shell escape is not explicitly enabled:

# Patched implementation in docling/backend/latex/engines/tectonic.py
def _build_command(self, tex_file: Path) -> list[str]:
    """Build the Tectonic command line for compiling ``tex_file``."""
    cmd = [str(self.binary_path)]
    if self.allow_shell_escape:
        # If shell escape is active, --untrusted cannot be used as it blocks execution
        cmd.extend(["-Z", "shell-escape"])
    else: 
        # Enforce strict local sandboxing and disable shell execution
        # --untrusted blocks file writing outside of working dir and blocks external paths
        # --only-cached prevents unauthorized network connections to remote TeX repositories
        cmd.append("--untrusted")
        cmd.append("--only-cached")
    cmd.append("--print")
    cmd.append(str(tex_file))
    return cmd

In addition to enforcing CLI sandboxing, the developers implemented a static validation pattern within the TectonicEngine class. The validator matches structural primitives and file inclusion commands to prevent path traversal attempts.

# Static regular expressions implemented in the patch
_PATH_ARGUMENT_PATTERN = re.compile(
    r"\\(?P<command>input|include|includegraphics|InputIfFileExists|graphicspath)"
    r"(?![A-Za-z])\*?(?:\s*\[[^\]]*\])?\s*\{*\s*(?P<path>[^{}\s]*)"
)
_FILE_PRIMITIVE_PATTERN = re.compile(
    r"\\(?P<command>openin|openout|XeTeXpicfile|XeTeXpdffile)(?![A-Za-z])"
)

The matching routine parses the input document string and detects if the document references absolute paths or uses traversal sequences like .. to access files outside the allocated working directory.

@classmethod
def _find_unsafe_construct(cls, text: str) -> str | None:
    """Return a description of the first outside file reference, if any."""
    primitive = cls._FILE_PRIMITIVE_PATTERN.search(text)
    if primitive is not None:
        return f"\\{primitive.group('command')}"
    for match in cls._PATH_ARGUMENT_PATTERN.finditer(text):
        path = match.group("path")
        if (
            path.startswith(("/", "\\", "~"))
            or re.match(r"[A-Za-z]:", path)
            or ".." in re.split(r"[/\\]", path)
        ):
            return f"\\{match.group('command')} with path {path!r}"
    return None

Exploitation Methodology

Exploitation of CVE-2026-105744 requires the target application to have configured the non-default Tectonic TikZ engine (tikz_engine="tectonic"). When this condition is met, an attacker can exploit the vulnerability by supplying a crafted LaTeX document or document format containing inline TikZ diagrams.

To achieve arbitrary file read, the attacker inserts standard file-inclusion macros into the TikZ nodes. When the compiler processes the macro, it reads the content of the target file and inserts it directly into the generated document as text, which is then rasterized. This enables the attacker to exfiltrate confidential files, such as environment variables, private keys, or system databases.

To write or overwrite local files, the attacker uses the TeX file-writing primitives. During compilation, the engine opens a file descriptor and writes the payload to disk. If the application environment permits writing to accessible directories, the attacker can drop executable payloads, web shells, or override configuration files to compromise host integrity.

Impact Assessment

The impact of this vulnerability is characterized by a complete compromise of the confidentiality, integrity, and availability of the local system environment running the Docling service. Under default system configurations where Docling is run with elevated shell escape permissions, an attacker can achieve unauthenticated remote code execution. This allows commands to be executed directly inside the system shell with the permissions of the application process.

If shell escape is disabled, the system remains vulnerable to arbitrary file write and arbitrary file read. The ability to write files inside the execution path can lead to second-order remote code execution, such as writing a malicious script into a shared import directory. The ability to read arbitrary local files allows attackers to bypass security boundaries, discover credentials, and extract application-specific secrets.

The Common Vulnerability Scoring System (CVSS) v3.1 base score is 7.5, reflecting high confidentiality, integrity, and availability impacts. The attack complexity is rated as high because the vulnerability is contingent on the application choosing the non-default Tectonic rendering engine.

Mitigation and Defense-in-Depth

The primary remediation strategy is upgrading the docling and docling-slim packages to version 2.132.0 or above. This version implements both the command-line isolation mechanisms and the static source filtering checks to limit the execution surface of Tectonic.

If upgrading is not immediately possible, organizations must implement strong mitigations. First, verify that the configuration does not utilize the Tectonic engine. Applications should use default rendering paths or safe alternative converters that do not parse arbitrary LaTeX macros.

Because TeX is a Turing-complete macro language, static validation of inputs is historically bypassable using dynamic string construction techniques like \csname. Therefore, applications must run Docling within an isolated sandbox environment, such as a containerized environment with restricted filesystem permissions, read-only system mounts, and minimal user privileges.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected Systems

Docling Document Parsing Applications running Tectonic renderingDocling Slim installations with Tectonic engine enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
docling
docling-project
>= 2.94.0, < 2.132.02.132.0
docling-slim
docling-project
>= 2.94.0, < 2.132.02.132.0
AttributeDetail
CWE IDCWE-22, CWE-73, CWE-1188
Attack VectorNetwork
CVSS Score7.5 (High)
EPSS Score0.00304 (Percentile: 21.27%)
Exploit StatusProof of Concept (PoC) available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The application fails to restrict directory paths or limit system command access when compiling untrusted LaTeX structures via the Tectonic rendering engine.

References & Sources

  • [1]Official Vendor Advisory (GHSA)
  • [2]Fix Commit (GitHub)
  • [3]NVD Entry

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

•19 minutes ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
1 views•9 min read
•about 1 hour ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 2 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
7 views•10 min read
•about 6 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 7 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
6 views•9 min read
•about 8 hours ago•CVE-2026-46429
5.5

CVE-2026-46429: Unrestricted File Upload and Validation Bypass in GeoNode

GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.

Amit Schendel
Amit Schendel
7 views•10 min read