Back to skill

Security audit

PDF Reader

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but users should be careful with its optional package-install flag and output file path.

Install only if you are comfortable running a local shell script for PDF extraction. Prefer preinstalling poppler and tesseract yourself, do not use --auto-install on shared or privileged hosts, and write output only to a dedicated temporary or work directory.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pdf-extract.sh:73
Finding

Caller-Controlled Output Path Allows Arbitrary File Overwrite

Content
View full analysis
"$OUTPUT" echo "[pdf-extract] Output written to: $OUTPUT" >&2 else cat fi } ``` ### Technical Analysis The `--output` argument is caller-controlled and is not subject to path canonicalization, destination-directory restrictions, existing-file checks, file-type validation, or symbolic-link protection. The redirection `cat > "$OUTPUT"` creates the destination if it does not exist and truncates it if it does. Quoting the variable prevents shell command injection but does not prevent unsafe filesystem access. Shell redirection also follows symbolic links, so a path that appears to be an ordinary output file may resolve to another file elsewhere on the system. The data written to the target is extracted from the supplied PDF. An attacker who can influence both the input PDF and the script arguments can therefore control, at least substantially, the content written to the selected file. ### Attack Path 1. An attacker supplies or identifies a PDF whose extracted text contains content suitable for a targeted text-based file. 2. The attacker induces the agent or another caller to run the Skill with `--output` or `-o` pointing to: - an existing file writable by the Skill process, - a sensitive path writable under the process privileges, or - a symbolic link that resolves to such a file. 3. The script processes the PDF and passes the extracted text to `output_text`. 4. `cat > "$OUTPUT"` follows any symbolic link and truncates or creates the resolved dest ...[truncated 1202 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill’s stated purpose is PDF text extraction, but it also advertises the ability to install system packages and language packs via package managers. That expands scope from document processing into host modification and code acquisition from external repositories, which is a meaningful security boundary change that users may not expect from a reader skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Automatically calling apt-get, yum, or brew is an unjustified capability for a PDF reader because it grants the skill the ability to alter the operating environment beyond reading documents. In agent contexts, this can be abused to trigger privileged package operations, pull software from external repositories, or create persistence and supply-chain risk unrelated to the user's apparent task.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Including package installation through apt-get, yum, or brew gives the skill capabilities beyond PDF extraction and increases operational risk. Even if intended for convenience, it can alter the system state, pull software from external sources, and create opportunities for misuse in environments where skills are expected to be narrowly scoped and non-mutating.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented auto-install option modifies the host system without strong warning that execution may install software and language packs. In agent environments, users may invoke a PDF-reading skill expecting file processing only, so hidden or lightly disclosed package installation can lead to unauthorized environment changes and broaden the blast radius of a simple content-handling request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script is presented as a PDF text extraction utility, but the --auto-install path invokes system package managers and changes the host environment by installing software. That exceeds the least-privilege expectations for a reader skill and can cause unauthorized system modification, especially if the skill runs in a privileged or shared environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script can modify the system when --auto-install is supplied, but the execution path does not provide a strong user-facing warning or confirmation at the moment packages are installed. In practice, this can lead to surprising host changes, especially when the flag is passed by another tool, wrapper, or agent rather than an informed human operator.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.