Back to skill

Security audit

Docling

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Docling helper, but it can make local network fetches for arbitrary URLs without clear destination safeguards.

Review before installing on shared agents, servers, CI runners, or machines with access to private networks. Use it only for trusted documents and URLs, avoid enabling remote services or external plugins unless vetted, and prefer pinning the docling version or running extraction in a sandbox with restricted network egress.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding
Unpinned Third-Party Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: Unpinned dependency installation from a third-party package index **Risk Level**: Medium ### Vulnerable Code ```markdown - `docling` CLI must be installed (e.g., via `pipx install docling`) ``` ### Technical Analysis The suggested installation command does not specify an exact Docling version, constrain transitive dependencies, or verify package integrity through hashes or signatures. It therefore installs whichever release and dependency graph the configured package index resolves at installation time. This creates a supply-chain risk: the code installed by users can differ from the code considered during this audit. A compromised maintainer account, malicious future release, dependency confusion event, or compromised transitive dependency could result in attacker-controlled package installation or build logic being executed locally. The project metadata declares version `1.0.2`, but this does not constrain the version installed by `pipx install docling`. ### Attack Path 1. An attacker compromises the Docling package, one of its transitive dependencies, a maintainer account, or the package distribution channel. 2. The attacker publishes a malicious release that satisfies the unconstrained installation request. 3. A user follows the documented prerequisite and runs `pipx install docling`. 4. The package manager downloads the attacker-controlled release and executes applicable build or installation logic. 5. The malicious package subsequently runs with the privileges of the installing user whenever the CLI is invoked. ### Impact Assessment Successful exploitation could execute arbitrary code under the account performing the installation. That code could access files, credentials, environment variables, and network resources available to that user. The scope depends on the installation environment and becomes more severe if package installation is performed ...[truncated 145 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin Docling to a specifically reviewed version, for example `pipx install 'docling==<reviewed-version>'`. - Use a lock file or equivalent mechanism to constrain transitive dependency versions. - Verify package artifacts using cryptographic hashes or trusted signatures. - Explicitly configure a trusted package index and disable unintended fallback indexes. - Periodically review pinned dependencies for known vulnerabilities before updating them. - Perform installation and document processing as an unprivileged user in an isolated environment. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:29
Finding
Unrestricted URL Fetching Can Reach Internal Network Resources<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 29–35 and line 61 **Vulnerability Type**: Unrestricted server-side URL fetching **Risk Level**: Medium ### Vulnerable Code ```markdown ### Web Page → Markdown (default) ```bash docling "<URL>" --from html --to md ``` Output: creates a `.md` file in current directory (or use `--output`) ### Web Page → Plain Text ```bash docling "<URL>" --from html --to text --output /tmp/docling_out ``` ``` The workflow repeats the unrestricted invocation: ```markdown 1. **For web content extraction**: Use docling "<URL>" --from html --to text --output /tmp/docling_out ``` ### Technical Analysis The documented workflow passes a supplied URL directly to a network-capable CLI without requiring validation of the URL scheme, destination hostname, resolved IP address, redirect target, or port. If an untrusted party can influence the URL processed by the Agent, the fetch operation may be directed toward resources accessible from the Agent host but unavailable to the attacker. Potential destinations include loopback services, private-network hosts, link-local endpoints, and cloud instance metadata services. The generated output is subsequently read by the Agent, which can expose retrieved response content in the conversation. The warning about custom headers and remote services does not address destination validation. No evidence of automatic external exfiltration was found; exploitation requires the retrieved content to be returned or otherwise disclosed through the normal Agent workflow. ### Attack Path 1. An attacker submits a URL pointing to a loopback, private, link-local, or otherwise internal destination. 2. The Agent follows the Skill instructions and invokes Docling with the attacker-selected URL. 3. Docling sends the request from the Agent host, inheriting that host's network reachability. 4. The internal service responds, and Docling writes the extracted response into the output directory. 5. ...[truncated 908 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Accept only explicitly supported schemes, preferably `https`. - Reject URLs containing embedded credentials, ambiguous host syntax, or unexpected ports. - Resolve the destination before connecting and block loopback, private, link-local, multicast, unspecified, and reserved IP ranges for both IPv4 and IPv6. - Revalidate DNS results immediately before connection and validate every redirect destination. - Apply an approved-host allowlist where the use case permits it. - Prevent forwarding sensitive headers or credentials across origins and redirects. - Enforce request timeouts, response-size limits, redirect limits, and network egress controls. - Run document extraction in a sandbox without access to internal networks or cloud metadata endpoints. - Require user confirmation before fetching a destination that is not already trusted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The CLI reference documents `--enable-remote-services` without warning that enabling it may send document contents or metadata to external systems. In a document-extraction skill that processes potentially sensitive PDFs, images, and web content, this omission can lead users to unknowingly exfiltrate confidential data over the network.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The reference documents `--allow-external-plugins` without warning that third-party plugins execute untrusted code in the local environment. In this skill context, users may run docling on local machines or servers with access to sensitive files, so enabling plugins can create a path to arbitrary code execution, data theft, or system compromise.

Static analysis

No suspicious patterns detected.