Back to skill

Security audit

Pdf Reader

Security checks for vulnerabilities and agentic risk

Overview

This PDF helper is not clearly malicious, but it is unfinished and saves document-derived output/history in fixed local locations without enough user control.

Review carefully before installing. Avoid sensitive PDFs unless output location and history logging are made explicit and configurable, real PDF parsing is implemented, remote API use is opt-in, and dependencies are pinned or installed in an isolated environment.

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
README.md:39
Finding
Unpinned Third-Party Dependencies Allow Unreviewed Package Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 39-43 **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Vulnerable Code ```bash # Install PDF parsing libraries pip install PyMuPDF pdfplumber pymupdf4llm ``` ### Technical Analysis The installation instructions retrieve three third-party packages without version constraints or integrity hashes. Consequently, the command installs whichever package versions and transitive dependencies are selected by the package index at installation time rather than a fixed, reviewed dependency set. Python packages can execute package-controlled build or installation logic, and their installed modules execute with the privileges of the invoking user when imported. If a named package, its distribution infrastructure, or one of its transitive dependencies is compromised, users following this instruction could install code that was not present during the Skill audit. No evidence indicates that the currently named packages are malicious. The vulnerability is the mutable and unverifiable dependency installation process. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or the relevant package-publishing account or distribution channel. 2. The attacker publishes a malicious release that remains compatible with the unconstrained package names. 3. A user follows the documented `pip install` command. 4. `pip` resolves and downloads the attacker-controlled release because no reviewed version or cryptographic hash is required. 5. Malicious build, installation, or imported runtime code executes with the privileges of the user performing the installation or running the Skill. ### Impact Assessment Successful exploitation could allow arbitrary code execution in the installation or runtime environment. The resulting access would generally be limited to the privileges of the invoking user, but could include reading or modi ...[truncated 265 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a specifically reviewed version, preferably using exact constraints such as `PackageName==X.Y.Z`. 2. Generate and commit a lock file that also fixes all transitive dependency versions. 3. Record cryptographic hashes and install with hash verification, such as `pip install --require-hashes -r requirements.txt`. 4. Review dependency provenance, package ownership, release history, and transitive dependency changes before updating the lock file. 5. Perform installation inside an isolated virtual environment rather than the global Python environment. 6. Avoid running package installation with administrative or root privileges. 7. Add automated dependency vulnerability and integrity scanning to the release process. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The documented behavior exceeds the declared purpose by writing outputs to a fixed local path, persisting processing history, and adding Q&A capabilities not reflected in the description. This mismatch is dangerous because it can hide privacy-impacting side effects and mislead users or reviewers about where document contents are stored or how broadly the skill may act, especially when processing sensitive PDFs.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The advertised PDF-reading behavior is not implemented: the extractor ignores the supplied file and always returns hard-coded sample content. This is dangerous because users may trust summaries, key points, and answers as if they came from their document, causing integrity failures, misinformation, and possible downstream disclosure if users act on fabricated results.

Natural-Language Policy Violations

Medium
Confidence
73% confidence
Finding
Most of the README, including usage examples and descriptions, is written only in Chinese, and the examples imply Chinese-language prompts for operation. There is no indication that users may interact in another language or that the language restriction is intentional and justified, which may conflict with a language-choice policy.

Description-Behavior Mismatch

Medium
Confidence
85% confidence
Finding
The README describes the skill as providing PDF conversion, summaries, key-point extraction, and content Q&A as current functionality. However, the development checklist later states '真实 PDF 解析(PyMuPDF)' and 'RAG 问答' are not yet completed, which indicates the documented capabilities overstate what is actually implemented.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The invocation examples use generic natural-language phrases like '处理这个 PDF' and '提取重点' without clear activation boundaries or an explicit command prefix. In agent environments, broad triggers can cause unintended execution on nearby content or ambiguous user text, increasing the risk of accidental processing of sensitive files or prompt-routing mistakes.

Intent-Code Divergence

Medium
Confidence
89% confidence
Finding
The usage example suggests users can ask questions about the PDF content ('这篇论文讲了什么?'), implying interactive question answering is supported. Later, the development plan explicitly marks 'RAG 问答' as unchecked, which directly conflicts with the example's representation of available behavior.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The README states that processing history is automatically generated, implying persistent storage of user interaction or file metadata, but provides no warning, retention details, or consent model. This can expose sensitive document names, paths, or summaries on disk, especially in shared or synced environments.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill describes file read/write behavior and local persistence, but it does not declare a formal tool scope such as permissions or allowed-tools. This creates a least-privilege and transparency problem: hosts or reviewers cannot reliably constrain the skill's access, and users are not clearly informed of the operational boundary before sensitive files are handled.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger phrases are broad enough to activate on ordinary conversation about PDFs, increasing the chance of unintended invocation. In a skill that may read uploaded files, write outputs, or optionally use network services, accidental activation can expose document contents or initiate side effects without sufficiently specific user intent.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly mentions file writing and optional network/API processing, but it does not provide a clear privacy notice or data-handling warning. For PDF content, which often includes confidential business, academic, or personal data, this omission can cause users to unknowingly allow local persistence or third-party transmission of sensitive information.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
Natural-language strings, docstrings, prompts, and responses are written in Chinese, and the logic checks for Chinese question words to trigger behavior. There is no indication that the user can opt into another language or that the locale restriction is required for a justified regional use case.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill writes converted document content to a fixed desktop/OneDrive path unrelated to the source file or explicit user choice. This can expose potentially sensitive PDF contents to an unintended synced location, increase risk of accidental sharing, and violate user expectations about where data is stored.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Persisting PDF-derived content to a fixed desktop directory without notice or consent is a privacy and data-handling issue. In this skill context, users may process private papers or documents, and automatic saving to a visible or cloud-synced folder makes unintended disclosure more likely.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill silently stores a local processing history including filenames, timestamps, output paths, and approximate document metrics. Even without full content, this metadata can reveal sensitive research topics, document names, workflow patterns, and local filesystem details to other local users or processes.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
`main` formats a success message using `result['word_count']`, implying that `process_pdf` provides that value, but the returned dictionary omits it. This contradicts the apparent interface promised by the calling code and causes the advertised successful processing flow to fail at runtime.

Missing User Warnings

Low
Confidence
79% confidence
Finding
The feature description includes PDF-to-Markdown conversion, and the example output later shows a generated Markdown file path, indicating the skill writes derived content to local storage. The README does not explicitly warn users that running the skill may create output files on disk, which can affect user data and workspace contents.

Static analysis

No suspicious patterns detected.