Back to skill

Security audit

Pdf

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward PDF-processing guide with some sensitive-capable examples, but no hidden behavior, persistence, exfiltration, or automatic execution.

Install this skill only if you want local PDF-processing guidance. Use password-removal commands only for PDFs you own or are explicitly authorized to access, and install optional Python packages in a virtual environment from trusted sources, ideally with pinned versions.

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:215
Finding
Unpinned Third-Party Package Installation## Vulnerability Details **File Location**: `SKILL.md`, line 215 **Vulnerability Type**: Uncontrolled third-party dependency versions **Risk Level**: Medium ### Vulnerable Code ```python # Requires: pip install pytesseract pdf2image ``` ### Technical Analysis The Skill instructs users to install `pytesseract` and `pdf2image` without pinning reviewed versions or verifying package hashes. It also does not provide a lock file or explicitly identify a trusted package index. Consequently, the installed code may vary over time. If one of these packages or its dependency chain is compromised, a user following the instruction could install attacker-controlled code. Python packages can execute code during installation or when subsequently imported by the OCR example. This finding concerns unsafe dependency acquisition guidance; the audit found no evidence that either named package is currently malicious. ### Attack Path 1. An attacker compromises a named package, one of its transitive dependencies, or the package distribution channel. 2. A user follows the instruction and runs the unpinned `pip install` command. 3. The package resolver selects an attacker-controlled or compromised release because no approved version or hash is enforced. 4. Malicious package code executes during installation or when the OCR workflow imports the package. 5. The payload operates with the privileges and environment access of the user running Python or `pip`. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the installing user's account. The resulting access could include reading or altering files available to that user, accessing environment variables and local credentials, and processing or exfiltrating sensitive PDF content. The scope would ordinarily be limited to the user's permissions unless the installation is performed with elevated privileges.
Remediation
## Remediation Suggestions - Pin every direct and transitive dependency to a reviewed version. - Store dependency constraints in a version-controlled lock or requirements file. - Require cryptographic hashes during installation, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` - Generate `requirements.txt` with exact versions and SHA-256 hashes for all resolved distributions. - Use an explicitly configured, trusted package index or an internally controlled package mirror. - Perform installation in a dedicated virtual environment without administrative privileges. - Routinely scan dependencies for known vulnerabilities and review updates before changing pinned versions. - Consider documenting OS-level dependencies required by OCR and PDF conversion tools so users do not obtain binaries from unverified sources.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill explicitly documents `qpdf --decrypt` password removal for encrypted PDFs without any policy guardrails, authorization checks, or warning that it should only be used on documents the user is entitled to access. In a general-purpose PDF-processing skill, this enables handling of protected documents in a way that can facilitate unauthorized access to sensitive content and normalizes bypass of document protections.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation shows how to decrypt an encrypted PDF using a supplied password but provides no warning about sensitive-document handling, authorization, or the risks of processing protected files. Even when technically legitimate, presenting this as a routine example in the skill lowers friction for misuse and may cause an agent to assist with deprotecting confidential material without appropriate safeguards.

Static analysis

No suspicious patterns detected.