Back to skill

Security audit

PDF Extract MD + Figures

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: it locally converts a user-provided PDF into Markdown and extracted image files, with some install and privacy hygiene caveats.

Install dependencies in a dedicated virtual environment rather than system Python, choose an output directory deliberately, and do not use this on confidential PDFs unless local extracted text and images are acceptable to keep or clean up afterward.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:30
Finding

Unpinned Dependency Installation Bypasses Python Environment Protections

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 30
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

bash
pip install 'markitdown[all]' pymupdf --break-system-packages -q

Technical Analysis

The installation command does not pin markitdown[all], pymupdf, or their transitive dependencies to reviewed versions and does not verify package hashes. Consequently, installations performed at different times may retrieve materially different code from the configured package index.

The all extra broadens the transitive dependency set, increasing the supply-chain attack surface. In addition, --break-system-packages bypasses protections intended to prevent pip from modifying a distribution-managed Python environment. This can overwrite or conflict with system-managed components.

No evidence indicates that these named packages are malicious. The risk arises from mutable, unverified dependency resolution and installation into a protected environment.

Attack Path

  1. A user or agent follows the setup instruction in SKILL.md.
  2. Pip resolves the latest available versions of the two packages and their transitive dependencies.
  3. If an upstream release, dependency, configured package index, or package-distribution account is compromised, pip downloads attacker-controlled package content.
  4. Malicious installation hooks or imported runtime code execute with the privileges of the account running pip or the PDF-processing script.
  5. Because --break-system-packages permits changes to the system-managed environment, affected components or dependency conflicts may extend beyond this Skill.

Impact Assessment

Successful supply-chain exploitation could provide arbitrary code execution with the privileges of the installing user. Depending on those privileges, an attacker could access that user's files, modify the Python environment, tamper with generated ou ...[truncated 298 chars]

Remediation
View remediation

Remediation Suggestions

  1. Create and activate a dedicated virtual environment rather than modifying the system Python installation.
  2. Remove --break-system-packages from the documented command.
  3. Pin direct and transitive dependencies to versions that have been reviewed and tested.
  4. Generate a lock file or hash-pinned requirements file and install with hash verification, such as pip install --require-hashes -r requirements.txt.
  5. Avoid the broad markitdown[all] extra unless every included integration is required; install only the minimum dependencies needed for PDF conversion.
  6. Review dependency advisories regularly and update pins through a controlled testing process.
  7. Run PDF processing under a non-privileged account with access limited to the input PDF and designated output directory.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger guidance is extremely broad and instructs the agent to use this skill whenever a user uploads a PDF or asks for common analysis tasks, even by default on vague prompts like 'analyze this PDF.' This can cause over-activation of a filesystem-writing workflow without clear user intent, leading to unexpected processing, dependency installation, and disk writes.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill performs file reads and writes but does not declare any explicit tool scope or permissions boundary. That can cause the agent to run the workflow with broader filesystem access than users expect, increasing the chance of unintended access to local files or uncontrolled creation of output artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow creates a markdown file, figure directories, miscellaneous image folders, and a manifest on disk, but the instructions do not require a user-facing warning or consent before those artifacts are written. In contexts involving sensitive PDFs, silent persistence of extracted text and images can expose confidential content, leave residual data behind, or violate user expectations about ephemeral processing.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.