Back to skill

Security audit

ClawPDF Master

Security checks for vulnerabilities and agentic risk

Overview

This PDF skill appears to perform ordinary, user-directed PDF reading and writing, but it overstates some features and needs care around dependencies and output overwrites.

Install only in an isolated environment, pin or review the listed dependencies before installing them, and run the scripts only on PDFs and folders you intentionally choose. Be careful with output paths because existing files may be overwritten, and treat advertised OCR/forms features as incomplete unless the missing files are added.

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:79
Finding

Unpinned Third-Party Dependency Installation Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:79; related dependency instructions in scripts/pdf_summary.py:9-11 and scripts/pdf_to_markdown.py:8-10
Vulnerability Type: Unpinned and undeclared third-party dependencies
Risk Level: Medium

Evidence

SKILL.md:79:

bash
# Requires: pip install pytesseract pdf2image + tesseract

scripts/pdf_summary.py:9-11:

python
    try:
        import pdfplumber
    except ImportError:
        sys.exit("FEJL: pip install pdfplumber")

scripts/pdf_to_markdown.py:8-10:

python
    try:
        import pdfplumber
    except ImportError:
        sys.exit("FEJL: pip install pdfplumber")

Technical Analysis

The project directs users to install pytesseract, pdf2image, and pdfplumber without specifying exact versions, package hashes, a lockfile, or an explicitly trusted package index. The scripts also depend on pypdf, but the project does not provide a dependency manifest that constrains or verifies that package.

Package installation commands that resolve unconstrained versions make the installed implementation mutable after the Skill has been reviewed. If a dependency release or its distribution channel is compromised, users following these instructions could install attacker-controlled code. Python packages can execute code during installation and whenever imported by these scripts.

No evidence was found that the named packages are currently malicious. The confirmed issue is the absence of dependency pinning and integrity controls, which creates an avoidable supply-chain exposure.

Attack Path

  1. A user invokes a script without the required Python dependency installed.
  2. The script or documentation instructs the user to run an unconstrained pip install command.
  3. pip resolves the package from its configured index without a project-provided version or hash constraint.
  4. If the package, a future rele ...[truncated 786 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a dependency manifest covering every runtime dependency, including pdfplumber, pypdf, pytesseract, and pdf2image.
  2. Pin each dependency to a reviewed exact version rather than allowing mutable latest-version resolution.
  3. Generate and verify cryptographic hashes, such as by using a hash-locked requirements file and pip install --require-hashes.
  4. Install packages only from an explicitly configured, trusted package index.
  5. Use an isolated virtual environment and avoid installing dependencies with root or administrator privileges.
  6. Add automated dependency vulnerability and integrity checks to the release process.
  7. Replace ad hoc error messages with a reference to the reviewed, locked dependency installation procedure.
  8. Ensure documented features reference files that actually exist; the current documentation mentions scripts/pdf_ocr.py, which is absent from the audited package.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code only implements two batch operations: extracting text from PDFs in a folder and merging PDFs. This partially matches the declared batch folder processing and merge/text extraction claims, but it does not implement several prominently declared capabilities, especially the highlighted unique features of PDF-to-Markdown conversion and automatic AI document summaries. It also lacks table extraction, PDF creation, splitting, forms, and OCR. Because the declared description materially overstates the implemented functionality, the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The supplied code is narrowly focused on converting one PDF file to Markdown using pdfplumber. It does extract text and tables, which aligns with part of the declared description, and it supports the specifically claimed PDF-to-Markdown feature. However, the broader declared purpose describes a much more comprehensive PDF toolkit, including creation, merge/split, forms, OCR, batch folder processing, and AI-generated summaries. None of those capabilities appear in this code chunk. Because the declared description materially overstates what this code actually does, the description does not accurately represent the supplied code chunk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill advertises and demonstrates file-reading and file-writing behavior but does not declare any explicit tool scope or permissions boundary. In an agent environment, missing scope declarations can cause the skill to run with broader-than-expected filesystem access, increasing the chance of unintended data exposure or overwriting files during PDF conversion, OCR, batch processing, or summary generation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation is predominantly written in Danish, including operational descriptions and examples, without indicating that language is optional or region-specific. This can violate a language/locale policy when users are not given an explicit choice or opt-in for Danish.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states the feature in Danish, and the script’s user-facing messages and generated headings are all hard-coded in Danish. This creates a language/locale policy issue because the skill does not offer the user any language choice or explain that it is intentionally limited to a Danish-only context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script writes directly to the user-supplied output path using write mode, which will silently overwrite an existing file. While this is standard CLI behavior in some tools, it can cause unintended data loss if a user mistypes the destination or reuses an existing filename during batch processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring forces a specific language/locale in user-facing natural language. The policy for this category applies to all file types and flags language constraints unless the skill offers a language choice or clearly documents a justified regional limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

Multiple user-facing strings such as progress, errors, and usage text are only presented in Danish. This is a natural-language locale restriction and there is no indication that users can choose another language or that the locale limitation is intentionally justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description is written as a Danish-only user-facing description, which indicates the skill is localized to a specific language without offering any user opt-in or language choice. The policy requires avoiding forced language or locale constraints unless they are explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The error, usage, and status strings are user-facing natural-language messages presented only in Danish, which forces a specific language choice on users. There is no indication that the user selected Danish or that the tool is intentionally restricted to that locale.

Content

No source excerpt is available for this finding.