Back to skill

Security audit

pdf-image-extractor

Security checks for vulnerabilities and agentic risk

Overview

This skill locally extracts images from user-selected PDF folders and does not show hidden network access, credential use, persistence, or destructive behavior.

Install in a dedicated virtual environment, consider pinning PyMuPDF and Pillow to reviewed versions, and edit the configured PDF/output folders before running so the tool only processes the intended local documents.

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:23
Finding
Unpinned Third-Party Dependencies Allow Unreviewed Package Versions## Vulnerability Details **File Location**: `SKILL.md`, line 23 **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ```bash pip install pymupdf pillow ``` ### Technical Analysis The installation instructions retrieve `pymupdf` and `pillow` without specifying reviewed versions or cryptographic hashes. Consequently, the installed code depends on whichever releases the package index resolves at installation time. This makes builds non-reproducible and prevents integrity verification against an approved dependency set. The package names appear legitimate, and the audit found no evidence that the project deliberately references a malicious package or unsafe package repository. The risk arises because a compromised, malicious, unexpectedly changed, or incompatible future dependency release could be installed without further project changes. Python package installation may execute package-controlled build or installation logic, while imported dependencies execute with the privileges of the user running the extraction scripts. ### Attack Path 1. A user follows the Quick Start instructions in `SKILL.md`. 2. The user runs `pip install pymupdf pillow`. 3. The package manager resolves versions available from its configured package index at that time rather than a reviewed, fixed dependency set. 4. If a resolved release or the configured package source has been compromised, package-controlled installation or runtime code executes locally. 5. The malicious dependency inherits the installing or executing user's access to local files, environment variables, and other resources permitted to that account. ### Impact Assessment Successful exploitation would execute dependency-supplied code with the privileges of the user installing or running the Skill. Depending on that user's permissions, this could permit access to local PDF input data, modification of generated files, reading of other user-accessible files, or arbitrary local code executio ...[truncated 305 chars]
Remediation
## Remediation Suggestions 1. Create a dependency lock or requirements file containing versions that have been reviewed and tested, for example: ```text PyMuPDF==REVIEWED_VERSION Pillow==REVIEWED_VERSION ``` 2. Generate and record cryptographic hashes for every approved distribution, including transitive dependencies where applicable. 3. Require hash verification during installation: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Use an approved package index or internally controlled mirror, and explicitly configure the index rather than relying on an unknown local pip configuration. 5. Review dependency advisories regularly and update pins through a controlled testing and approval process. 6. Recommend installation inside a dedicated virtual environment under a non-privileged account. 7. Replace the unpinned command in `SKILL.md` with the reproducible, hash-verified installation procedure.
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The docstring and printed messages indicate the skill is designed to communicate only in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file’s docstring and all user-facing prompts are written only in Chinese, including the menu and input instructions. For a general-purpose utility, this imposes a specific language on users without opt-in or explanation, which matches the language/locale policy violation criteria.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
This markdown file presents all user-facing instructions and parameter explanations exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly documented and justified, which is not present here.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
This code file contains natural-language descriptions and user-facing output exclusively in Chinese, including the module docstring and console messages. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a natural-language policy violation when no justification or alternative is provided.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The file's natural-language descriptions and user-facing status messages are entirely in Chinese, with no indication that language is configurable or optional. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Static analysis

No suspicious patterns detected.