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

CVE-2026-105745: Arbitrary Code Execution via Malicious Entrypoint Discovery in Docling base_factory

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 8, 2026·6 min read·46 visits

Executive Summary (TL;DR)

Docling unconditionally imported external third-party entrypoint modules during initialization before checking namespace validation parameters, allowing malicious local packages to execute code at import time.

Docling prior to version 2.131.0 is vulnerable to arbitrary local code execution during module initialization due to incorrect order of operations in its plugin discovery system. Even when the default option to reject external plugins is active, Docling utilizes Pluggy to scan and import entrypoints before performing namespace validation.

Vulnerability Overview

Docling is an open-source document processing library widely used to parse and convert structured documents into machine-readable formats. To facilitate extensibility across various optical character recognition (OCR) systems and model pipelines, Docling implements a dynamic plugin discovery framework. This framework discovers and registers extension components configured as Python packaging entrypoints.

By design, Docling includes a configuration mechanism (allow_external_plugins=False) intended to restrict the loading of modules to officially supported namespaces starting with docling.. This flag is active by default in both CLI execution and programmatic API initializations to prevent unauthorized extensions from running.

However, a design flaw exists in how the discovery workflow is sequenced in the base factory engine. Under affected versions, Docling scans the execution environment and resolves all modules declared under the docling group identifier. Because the validation steps are deferred until after the entrypoints are processed, the system exposes an attack surface where installing any untrusted Python package locally leads to automatic execution of that package's import-time logic.

Root Cause Analysis

The underlying security flaw is classified under CWE-696 (Incorrect Behavior Order) and CWE-829 (Inclusion of Functionality from Untrusted Control Sphere). In the Python ecosystem, importing a module involves execution of all top-level statements, class definitions, and variable assignments within the target module scope. This behavior is standard and occurs prior to the module object being fully returned to the namespace.

Docling relied on the Pluggy library's PluginManager.load_setuptools_entrypoints() function to identify and register plugins. When Pluggy executes this command, it searches metadata for entrypoints registered under a specified group name. Once found, Pluggy automatically resolves and imports the backing modules so it can register the hook implementations defined within them.

The logic error in Docling's base factory occurs because load_setuptools_entrypoints() is called unconditionally at the beginning of the load_from_plugins function. This loading mechanism executes prior to checking the allow_external_plugins configuration parameter. While the code subsequently screens the module namespace and skips registering any unauthorized objects, the malicious side effects defined at the module's global level have already completed execution in the application's runtime.

Code Analysis

To understand the implementation flow of the vulnerability, examine the deprecated code pattern in docling/models/factories/base_factory.py alongside the revised mitigation pattern.

Vulnerable Design

In the vulnerable implementation, all module discovery is executed via direct reliance on Pluggy's autoloader without verification of metadata string names first:

# File: docling/models/factories/base_factory.py (Vulnerable Implementation)
plugin_manager = PluginManager(plugin_name)
# Unconditionally imports all entrypoints declared under the specified plugin_name group
plugin_manager.load_setuptools_entrypoints(plugin_name)
 
for plugin_name, plugin_module in plugin_manager.list_name_plugin():
    plugin_module_name = str(plugin_module.__name__)
 
    # Validation check occurs AFTER import execution
    if not allow_external_plugins and not plugin_module_name.startswith("docling."):
        logger.warning(
            f"The plugin {plugin_name} will not be loaded because Docling is being executed with allow_external_plugins=false."
        )
        continue

Remediation Pattern

The patched implementation replaces bulk autoloading with standard library inspection via importlib.metadata.entry_points. This allows metadata parsing to filter by namespace string before importing the underlying module:

# File: docling/models/factories/base_factory.py (Patched in Commit 0f443b3786e98688a2da3b7c8f56fe5e46af876c)
from importlib.metadata import entry_points
 
plugin_manager = PluginManager(plugin_name)
 
# Query registered metadata structures instead of triggering imports
for entry_point in entry_points(group=plugin_name):
    if plugin_manager.get_plugin(entry_point.name) is not None:
        continue
 
    # Perform validation on the string metadata path before loading the module
    if not allow_external_plugins and not entry_point.module.startswith(
        "docling."
    ):
        logger.warning(
            f"The plugin {entry_point.name} will not be loaded because Docling is being executed with allow_external_plugins=false."
        )
        continue
 
    # Safe registration only after metadata validation passes
    plugin_manager.register(entry_point.load(), name=entry_point.name)

Technical Execution Flow

Exploitation Methodology

Exploitation of CVE-2026-105745 requires an attacker to place a package with a malformed or malicious entrypoint registration into the local Python package registry (sys.path). While this limitation makes exploitation complex, standard target vectors exist in supply chain spaces such as typosquatting on PyPI, dependency confusion within private registries, or exploiting pre-existing write access to local site-packages.

To construct a proof-of-concept, an attacker defines a dependency package configuration specifying an entrypoint within the target namespace group:

# File: pyproject.toml of malicious dependency
[project.entry-points."docling"]
malicious_payload = "untrusted_package.malicious_plugin"

The target file untrusted_package/malicious_plugin.py contains direct system execution logic inside the global/module execution context:

# File: untrusted_package/malicious_plugin.py
import os
import sys
 
# Code runs instantly upon being searched by pluggy
os.system("id > /tmp/compromised")

When Docling is executed on a document by a victim user within an environment where the payload package has been deployed, Docling's entrypoint resolution will automatically look for and load untrusted_package.malicious_plugin. This initiates execution of the target payload sequence, writing user shell privileges to /tmp/compromised before any evaluation checks block the plugin registration.

Impact Assessment

The impact of this vulnerability is local code execution with the same permissions as the execution context of the Docling tool. Because docling is frequently used in cloud-based parsing services, batch ingestion jobs, or large language model (LLM) data pipeline servers, this context often has elevated capabilities including read access to internal databases, cloud provider instance metadata services, and system environment credentials.

The CVSS v3.1 vector is rated as CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H. The Attack Complexity is classified as High because it relies on placing malicious packages in the local environment, and User Interaction is Required since a user or system process must actively invoke Docling processes.

This behavior is highly impactful in automation settings where data workers run external open-source code inside multi-user shared execution nodes. The lack of proper isolation prior to dynamic imports allows an underprivileged tenant to compromise the active application server simply by installing a local package that register entrypoints under the standard group designations.

Mitigation and Remediation Guidance

The primary resolution path for CVE-2026-105745 is upgrading to version 2.131.0 or newer. If utilizing the core sub-libraries directly, you should verify that docling-core has been upgraded to a version matching or exceeding 2.98.0.

In environments where upgrading dependencies immediately is unfeasible, several defense-in-depth measures should be taken:

  1. Enforce strict python environment isolation by deploying applications within dedicated virtual environments or container constraints.
  2. Configure file permission boundaries on site-packages folders to prevent write capabilities by non-administrator users, blocking arbitrary package installations.
  3. Utilize standard package locking configurations (e.g., poetry.lock, requirements.txt with hashes) to enforce integrity validation on all dependencies to prevent dependency hijacking vectors.

Security administrators can inspect Python environments for rogue entrypoints under the docling group by running the following audit script:

import importlib.metadata
 
for ep in importlib.metadata.entry_points(group="docling"):
    is_valid = ep.module.startswith("docling.")
    status = "APPROVED" if is_valid else "WARNING: UNAUTHORIZED EXTERNAL MODULE"
    print(f"Entrypoint Name: {ep.name:25} | Module: {ep.module:40} | Status: {status}")

Fix Analysis (1)

Technical Appendix

CVSS Score
6.7/ 10
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS Probability
0.11%
Top 99% most exploited

Affected Systems

Docling Library (Python Package)Docling Slim (Python Package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
docling
docling-project
>= 2.27.0, < 2.131.02.131.0
docling-slim
docling-project
>= 2.27.0, < 2.131.02.131.0
AttributeDetail
CWE IDCWE-696
Attack VectorLocal
CVSS6.7 (Medium)
EPSS Score0.00109
ImpactArbitrary Code Execution
Exploit Statusnone
KEV StatusNo

MITRE ATT&CK Mapping

T1195.001Supply Chain Compromise: Compromise Software Dependencies and Development Tools
Initial Access
T1204.002User Execution: Malicious File / Script
Execution
T1059Command and Scripting Interpreter
Execution
CWE-696
Incorrect Behavior Order

The application performs an import operation before validating the external source, leading to unauthorized behavior execution.

Vulnerability Timeline

Vulnerability identified and vendor notified
2026-03-01
Pull request resolving issue merged
2026-03-01
Version 2.131.0 containing security patch released
2026-03-01
GitHub Advisory GHSA-9jxx-vjrv-h2rq published
2026-03-01

References & Sources

  • [1]GHSA-9jxx-vjrv-h2rq Security Advisory
  • [2]Fix Loading Order of External Plugins Pull Request
  • [3]Security Correction Commit
  • [4]Docling v2.131.0 Release Changelog
  • [5]NVD Vulnerability Detail Details

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

•1 day 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
6 views•10 min read
•1 day 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
11 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
13 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
14 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