Back to skill

Security audit

PDF Editor

Security checks for vulnerabilities and agentic risk

Overview

This PDF skill is mostly coherent, but it downloads and runs a persistent native CLI from mutable external URLs without hash or signature verification.

Review this skill before installing. It appears intended for local PDF editing and discloses its network use, but first use downloads and runs a native ComPDFKit CLI that was not included in the reviewed package. Install only if you trust the publisher and download host, and prefer environments where the agent has access only to the PDFs and output folders needed for the task.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:39
Finding
Unverified Remote Payload Retrieval and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 39–48 **Vulnerability Type**: Remote payload retrieval and execution without artifact verification **Risk Level**: High ### Vulnerable Code Snippet ```markdown The CLI binary is not included in the Skill package. It is downloaded from the **official ComPDFKit distribution server** (`download.compdf.com`) operated by PDF Technologies, Inc. The Agent must complete the following steps before the first execution: 1. Check whether `<CLI>` exists → skip if it does 2. **Inform the user** that the CLI binary will be downloaded from `download.compdf.com` (official ComPDFKit CDN) 3. Download the appropriate archive for the platform: - **[Windows]**: `https://download.compdf.com/skills/winCLI/win.zip` - **[Mac]**: `https://download.compdf.com/skills/macCLI/mac.zip` 4. Extract the archive to the `{skill_root}/scripts/` directory (the zip already contains a `win/` or `mac/` prefix, so the correct directory structure is formed automatically after extraction) 5. **[Mac]** After extraction, run: `chmod +x {skill_root}/scripts/mac/compdf_cli` 6. Verify: run `<CLI> --help` to confirm the binary is executable ``` ### Technical Analysis The audited package does not contain the CLI implementation. Instead, the Skill instructs the Agent to retrieve an executable archive from mutable external URLs, extract it, grant execution permission on macOS, and execute the resulting binary. No immutable version, expected cryptographic hash, digital-signature verification procedure, trusted signing identity, or archive-content validation is specified. Running `<CLI> --help` only confirms that the downloaded file can execute; it does not establish its authenticity or integrity. HTTPS protects data in transit under ordinary conditions but does not protect against compromise of the vendor infrastructure, CDN, signing account, or mutable artifact at the source. Because the effective executable payload is obtained after the Sk ...[truncated 1877 chars]
Remediation
## Remediation Suggestions 1. Distribute the CLI with the reviewed package where licensing permits, or use immutable, explicitly versioned artifact URLs. 2. Publish a trusted SHA-256 or stronger digest for every supported platform artifact and require verification before extraction or execution. 3. Digitally sign the binaries and archives. Verify the signature against a pinned vendor signing identity rather than merely checking that a signature exists. 4. Fail closed if the digest, signature, signer identity, platform, architecture, or expected filename does not match. 5. Validate the ZIP manifest before extraction: - Reject absolute paths and `..` path traversal. - Reject symbolic links and unexpected file types. - Permit only documented paths and filenames. - Enforce reasonable extracted-file count and size limits. 6. Extract into a newly created restricted directory first, validate all contents, and only then move the verified files into the Skill directory. 7. Present the exact artifact version, URL, digest, and signer to the user before download and obtain explicit approval before first execution. 8. Run the CLI with least privilege in an operating-system sandbox, restricting filesystem and network access to only the required input and output locations. 9. Treat `<CLI> --help` strictly as a functional check, not a security verification mechanism. 10. Provide source code or independently reproducible builds where feasible so the downloaded executable can be compared with the reviewed implementation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest description limits the skill to editing and organizing PDF pages with merge, insert, reorder, exchange, and crop operations. However, the documented command set includes split, extract, rotate, delete, convert to standards, optimize/compress, compare, and add/remove watermarks, which go beyond the stated page-management scope.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger phrases are broad, common requests such as 'edit pdf' and 'merge pdf', which can cause the skill to activate in situations where a user did not intend to invoke this specific third-party workflow. Because first use includes downloading a binary and later may involve file-destructive operations on user documents, unintended invocation raises meaningful security and safety risk.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Platform Detection (Agent must execute automatically)

Before running any CLI command, the Agent must automatically detect the platform (read `env.platform`: `win32`→Windows, `darwin`→Mac; or run `uname -s`). **Do NOT ask the user about their platform.**


| Variable             | [Windows]                                          | [Mac]                                             |
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Whitespace Padding

Medium
Category
Prompt Injection
Content
`<CLI> convert <input.pdf> --standard <format> [options]`


| Option                  | Description                                                                                 | Default                       |
| ----------------------- | ------------------------------------------------------------------------------------------- | ----------------------------- |
| `--standard`            | **Required**: `pdfa-1a` `pdfa-1b` `pdfa-2a` `pdfa-2b` `pdfa-2u` `pdfx-4` `pdfe-1` `pdfua-1` | —                            |
| `--icc <path>`          | ICC profile file                                                                            | `<ICC_SRGB>` or `<ICC_FOGRA>` |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## Usage Patterns (Agent quick reference)


| User says                 | Command                                                                                   |
| ------------------------- | ----------------------------------------------------------------------------------------- |
| "Split into single pages" | `<CLI> split "input.pdf" --mode all --overwrite`                                          |
| "Merge PDFs"              | `<CLI> merge "a.pdf" "b.pdf" --output "merged.pdf" --overwrite`                           |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
The instruction mandates automatic platform detection and explicitly says not to ask the user, which imposes a system-context decision without user opt-in. While not a direct language restriction, it is a natural-language instruction that overrides user choice about environment handling.

Static analysis

No suspicious patterns detected.