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·43 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

•about 22 hours ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
5 views•10 min read
•about 23 hours ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
10 views•12 min read
•1 day ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•1 day ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
11 views•10 min read
•1 day ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
13 views•10 min read
•1 day ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
6 views•9 min read