Skip to main content
Vulnerability Database/CVE-2026-105744

CVE-2026-105744: Docling Path Traversal Vulnerability

CVE-2026-105744 is a path traversal vulnerability in Docling that allows attackers to read, create, or overwrite files when using Tectonic rendering. This post explains its impact, affected versions, and mitigation steps.

Published:

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

CVE-2026-105744 affects Docling, a document processing library that integrates with the generative AI ecosystem. Versions from 2.94.0 up to (but not including) 2.132.0 are vulnerable when callers opt into LatexBackendOptions(tikz_engine="tectonic"). The docling/backend/latex/engines/tectonic.py module compiles untrusted TikZ bodies and document preambles without restricting TeX file primitives such as \openin and \openout. Crafted input can read arbitrary files available to the converter and create or overwrite writable files. Enabling tikz_engine_allow_shell_escape additionally permits shell command execution through TeX. The default configuration does not enable Tectonic rendering and is not affected. The flaw is tracked as [CWE-22] Path Traversal.

Critical Impact

Attackers who supply crafted LaTeX input can read sensitive files accessible to the Docling converter, overwrite writable files, and achieve command execution when shell escape is enabled.

Affected Products

  • Docling versions 2.94.0 through 2.131.x
  • Deployments that explicitly opt into LatexBackendOptions(tikz_engine="tectonic")
  • Deployments that enable tikz_engine_allow_shell_escape (additional command execution exposure)

Discovery Timeline

  • 2026-10-05 - CVE-2026-105744 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-105744

Vulnerability Analysis

Docling's Tectonic-backed TikZ render engine passes attacker-controlled LaTeX content directly to the Tectonic compiler without sandboxing or primitive filtering. TeX is a Turing-complete typesetting language with primitives that interact with the filesystem. The vulnerable engine in docling/backend/latex/engines/tectonic.py did not restrict \openin, \openout, \input, \include, \includegraphics, \InputIfFileExists, \graphicspath, \XeTeXpicfile, or \XeTeXpdffile. Combined with Tectonic's default behavior of allowing network and local file access, this permits exfiltration of files readable by the converter process and clobbering of files it can write.

When the caller also sets tikz_engine_allow_shell_escape=True, Tectonic runs with -Z shell-escape. This lets \write18 invoke shell commands, extending the issue to arbitrary command execution in the converter's security context.

Root Cause

The root cause is unrestricted invocation of TeX file and shell primitives on untrusted input. The engine did not pass --untrusted or --only-cached to Tectonic and did not screen the TikZ source for dangerous commands or absolute/parent-directory paths before rendering.

Attack Vector

Exploitation requires user interaction in the form of submitting a crafted document to a Docling pipeline configured with the Tectonic TikZ engine. The LaTeX preamble or TikZ body references file primitives that read secrets (for example /etc/passwd, cloud metadata, application config) or overwrite files the process can write. The adversary needs no authentication to the Docling service itself; they only need to supply the input document.

python
     )
     _LATEX_GRAPHICS_EXTENSIONS = (".pdf", ".png", ".jpg", ".jpeg", ".eps", ".svg")
 
+    # Best-effort pre-check for untrusted sources: skip rendering when the
+    # source names an absolute or parent-directory path for an input or
+    # graphics file, or uses the TeX primitives that open arbitrary files. It
+    # cannot see names built by macros or every way TeX can open files.
+    _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])"
+    )
+
     def __init__(
         self,
         timeout: float = 60.0,
-        allow_shell_escape: bool = True,
+        allow_shell_escape: bool = False,
     ):

Source: GitHub Commit 38b6fa0. The patch adds regex pre-checks for file primitives and flips allow_shell_escape to a safe default of False.

Detection Methods for CVE-2026-105744

Indicators of Compromise

  • LaTeX or TikZ submissions containing \openin, \openout, \input, \include, \includegraphics, \InputIfFileExists, or \graphicspath with absolute or parent-directory paths
  • Tectonic subprocess invocations spawned by Docling that read unexpected files such as /etc/passwd, SSH keys, cloud instance metadata endpoints, or application secret stores
  • Child processes of Tectonic that would only appear when -Z shell-escape is active (shells, curl, wget, package managers)
  • New or modified files in directories writable by the Docling service account that correlate with document conversion jobs

Detection Strategies

  • Inventory Docling deployments and flag any process using LatexBackendOptions(tikz_engine="tectonic") on versions 2.94.0 through 2.131.x
  • Alert on tectonic processes spawned by Docling with network egress or filesystem access outside the expected working directory
  • Scan submitted documents for the TeX file primitives listed above prior to passing them to the backend

Monitoring Recommendations

  • Log all invocations of the Tectonic engine with the full argument list and the hash of the input document
  • Monitor filesystem reads performed by the converter process using OS-level auditing (auditd, Sysmon FileCreate/FileRead)
  • Enable egress monitoring on hosts running Docling to detect data exfiltration staged through the LaTeX pipeline

How to Mitigate CVE-2026-105744

Immediate Actions Required

  • Upgrade Docling to version 2.132.0 or later
  • Audit application configuration and disable tikz_engine="tectonic" unless strictly required
  • Set tikz_engine_allow_shell_escape=False and remove any override that enables shell escape
  • Run Docling conversion workers under a least-privileged account with no access to secrets or writable application directories

Patch Information

The fix is published in Docling 2.132.0. See the GitHub Security Advisory GHSA-x3q2-h9hx-4r4j, the GitHub Pull Request 4419, and the v2.132.0 Release Notes. The patch runs Tectonic with --untrusted and --only-cached when shell escape is off, defaults allow_shell_escape to False, and adds best-effort regex screening for dangerous TeX primitives in docling/backend/latex/engines/tectonic.py.

Workarounds

  • Keep the default configuration, which does not enable Tectonic rendering and is not vulnerable
  • Process untrusted LaTeX in an isolated environment such as a container with no network egress and a read-only root filesystem
  • Strip or reject documents containing \openin, \openout, \write18, and absolute path arguments to \input, \include, \includegraphics, \InputIfFileExists, and \graphicspath
bash
# Upgrade to the patched release
pip install --upgrade "docling>=2.132.0"

# Verify installed version
python -c "import docling; print(docling.__version__)"

# Example safe configuration (Python)
# from docling.datamodel.backend_options import LatexBackendOptions
# options = LatexBackendOptions(
#     tikz_engine=None,                     # do not enable Tectonic for untrusted input
#     tikz_engine_allow_shell_escape=False, # never enable for untrusted input
# )

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.