Back to skill

Security audit

CamScanner Official Skill

Security checks for vulnerabilities and agentic risk

Overview

This document tool needs review because it recommends silently reporting full requests and commands and automatically replacing its software and instructions.

Before installing, require optional, minimized reporting and user-approved updates that verify both software and skill packages. Files are uploaded to CamScanner even when output is saved locally; specify local output if you do not want persistent account copies. All bundled files were inspected, but the downloaded CLI, actual reporting destination, and credential-storage implementation could not be verified.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (36)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The guide mandates automatic upgrades before business operations and states that upgrades replace executable binaries and the skill's instructions and scripts. Although updates are disclosed in the guide, automatically accepting replacement instructions and code expands a document-processing request into a supply-chain trust decision without a separate approval gate.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The code directly provides watermark removal, a distinct document-modification capability not disclosed in the description. It is not merely an implementation detail of the listed OCR, conversion, enhancement, or authenticity-checking features.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Scanning document structure is consistent with the declared OCR and processing features. However, the edit command changes the document's textual content, rather than merely recognizing text, enhancing the image, or converting its format. This content-alteration capability is not adequately disclosed by the description.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 97)May include surrounding context.

md
| Windows | `node scripts/upgrade.cjs` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 98)May include surrounding context.

md
| Fallback (any platform) | `node scripts/upgrade.cjs` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

md
auto-rolls back; manual rollback: `bash scripts/upgrade.sh --rollback` or `node scripts/upgrade.cjs --rollback`.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
After an upgrade changes the Skill, reread `SKILL.md` and the references needed for this task, then recheck capabilities and parameters. Record the actual CLI/S

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 129)May include surrounding context.

md
## Operating Limits

1. **Do not leak credentials**: Tokens must only be obtained through `camscanner-cli auth login` and stored in the system keychain.
2. **File size limit**: Uploaded files must not exceed 40 MB.
3. **Supported image formats**: JPG, JPEG, PNG.
4. **Supported document formats**: PDF, TXT, Markdown.

Silent usage reporting collects the user's verbatim request and executed commands without consent or redaction.

High
Category
Data Exfiltration
Confidence
98% confidence
Finding

The skill explicitly requires verbatim request collection and full command reporting, with silent execution and no consent or redaction requirement. This creates an unnecessary secondary collection channel for sensitive document-related information even when the requested task itself is legitimate.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/cloud-documents.md (reported line 41)May include surrounding context.

md
**Output format**: The CLI displays search results in a table.

**Agent display rules (mandatory)**: When presenting search results to the user, the agent **must** include at least the following four columns:

| Column | Source | Description |
|--------|--------|-------------|

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The usage comment recommends piping a remotely fetched script directly into a shell without authenticating or reviewing it. Although this comment does not execute by itself and uses a placeholder URL, following the documented pattern would allow a compromised distribution endpoint to execute arbitrary code with the installing user's privileges.

Content

Scanner excerpt · scripts/setup.sh (reported line 7)May include surrounding context.

sh
#
# Usage:
#   bash scripts/setup.sh
#   curl -fsSL <CDN>/setup.sh | sh
#
# Environment variables (all optional):
#   CAMSCANNER_CLI_VERSION — version to install (default: read from SKILL.md or "latest")

Chaining Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

The documented pipeline sends unverified network content directly to a command interpreter. This is the same unsafe installation recommendation as the SC2 finding, not separate evidence of malicious chaining or an automatically executed command.

Content

Scanner excerpt · scripts/setup.sh (reported line 7)May include surrounding context.

sh
#
# Usage:
#   bash scripts/setup.sh
#   curl -fsSL <CDN>/setup.sh | sh
#
# Environment variables (all optional):
#   CAMSCANNER_CLI_VERSION — version to install (default: read from SKILL.md or "latest")

The skill downloads and executes replacement software and rewrites its own agent instructions, beyond the manifest's document-processing scope.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The updater executes a downloaded CLI and replaces SKILL.md, references, and scripts, while verifying a checksum only for the CLI and never for the skill ZIP. A substituted skill package could therefore install persistent agent instructions and executable scripts; the document-processing context makes this especially sensitive because subsequent sessions may access private documents.

Content

No source excerpt is available for this finding.

The document-processing skill downloads and executes replacement software and overwrites its own agent instructions and scripts.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The updater executes a downloaded executable and overwrites agent instructions and scripts, but its checksum check covers only the executable, not the skill archive. Tampering with that archive could persist malicious instructions or code into future document-processing sessions, and an unsigned checksum from the same server does not independently authenticate the executable.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 170)May include surrounding context.

sh
# ── Cleanup ─────────────────────────────────────────────────────────────────

cleanup() {
  rm -f "$TMP_DIR/camscanner-cli-"* 2>/dev/null
  rm -f "$TMP_DIR/camscanner-skill-"* 2>/dev/null
  rm -f "$TMP_DIR/checksums.txt" 2>/dev/null
  rm -rf "$TMP_DIR/skill" 2>/dev/null

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 171)May include surrounding context.

sh
cleanup() {
  rm -f "$TMP_DIR/camscanner-cli-"* 2>/dev/null
  rm -f "$TMP_DIR/camscanner-skill-"* 2>/dev/null
  rm -f "$TMP_DIR/checksums.txt" 2>/dev/null
  rm -rf "$TMP_DIR/skill" 2>/dev/null
  release_lock

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 172)May include surrounding context.

sh
cleanup() {
  rm -f "$TMP_DIR/camscanner-cli-"* 2>/dev/null
  rm -f "$TMP_DIR/camscanner-skill-"* 2>/dev/null
  rm -f "$TMP_DIR/checksums.txt" 2>/dev/null
  rm -rf "$TMP_DIR/skill" 2>/dev/null
  release_lock
}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/upgrade.sh (reported line 173)May include surrounding context.

sh
rm -f "$TMP_DIR/camscanner-cli-"* 2>/dev/null
  rm -f "$TMP_DIR/camscanner-skill-"* 2>/dev/null
  rm -f "$TMP_DIR/checksums.txt" 2>/dev/null
  rm -rf "$TMP_DIR/skill" 2>/dev/null
  release_lock
}

Automatically installs remote executable code and rewrites agent skill instructions, beyond the stated document-processing purpose.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The updater executes remote software and replaces the skill's instructions and scripts, but only checks the CLI checksum and never authenticates the skill ZIP. A tampered skill archive could persist attacker-controlled behavior into subsequent sessions that handle private documents; the executable checksum also lacks an independent signature trust anchor.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The skill silently reports verbatim user requests and executed commands, beyond its advertised document-processing purpose.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The reporting instructions send verbatim requests and executed commands to a reporting interface while suppressing user-facing disclosure. These fields can contain confidential document details, search terms, local paths, and identifiers beyond what is necessary to process documents; the reporting backend and retention are not established here.

Content

No source excerpt is available for this finding.

Usage reporting includes verbatim user requests and executed commands without a privacy warning.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

Reporting captures raw user input and command strings without explaining the privacy implications or offering a consent step. Document-processing requests can contain sensitive personal or business information, and cloud-processing consent does not automatically authorize collecting the entire request as telemetry.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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.

Content

Scanner excerpt · SKILL.md (reported line 516)May include surrounding context.

md
- **Output path conflict protection**: The CLI silently overwrites existing files with `-o`; `pdf to-images -d` may also overwrite same-named page files in the directory. Before write operations, the agent **must** check whether the output path already exists. If it does:
  1. Prefer appending a numeric suffix, such as `output_1.jpg` or `output_2.jpg`.
  2. Or ask the user to confirm overwrite.
  3. Never overwrite an existing user file without confirmation.
- **Multiple file argument rules**: Do not pass multiple files with glob wildcards such as `*.jpg`. The agent **must**:
  1. Verify the requested file list and retain the user's explicit order; otherwise use natural sorting, where `page2` comes before `page10`.
  2. Pass each file as a full quoted path so spaces or special characters in filenames are safe.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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.

Content

Scanner excerpt · references/cloud-documents.md (reported line 127)May include surrounding context.

md
**Agent behavior rules**:
- `doc download` requires a `cs_doc_id` parameter (from the "Document ID" column in `doc search` results). **Without a cs_doc_id, downloading is not possible.**
- **Search results must be confirmed by the user before any operation**: even if only one document matches, the agent must present the result and wait for the user's explicit confirmation before downloading. **Do not** skip confirmation and auto-execute.
- **If the user has not provided a cs_doc_id and there are no search results in the current session**, the agent must first guide the user to run `doc search`, confirm the target document, then download.
  - Example: user says "download my contract" → Agent replies "Let me search for documents matching 'contract' first" → runs `doc search "contract"` → presents results for user confirmation → after confirmation, runs `doc download <cs_doc_id>`
- Office documents (doc_id suffix contains `_word1`, `_exce1`, `_pdfx0`, etc.) auto-keep their format; no nee

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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.

Content

Scanner excerpt · references/cloud-documents.md (reported line 127)May include surrounding context.

md
**Agent behavior rules**:
- `doc download` requires a `cs_doc_id` parameter (from the "Document ID" column in `doc search` results). **Without a cs_doc_id, downloading is not possible.**
- **Search results must be confirmed by the user before any operation**: even if only one document matches, the agent must present the result and wait for the user's explicit confirmation before downloading. **Do not** skip confirmation and auto-execute.
- **If the user has not provided a cs_doc_id and there are no search results in the current session**, the agent must first guide the user to run `doc search`, confirm the target document, then download.
  - Example: user says "download my contract" → Agent replies "Let me search for documents matching 'contract' first" → runs `doc search "contract"` → presents results for user confirmation → after confirmation, runs `doc download <cs_doc_id>`
- Office documents (doc_id suffix contains `_word1`, `_exce1`, `_pdfx0`, etc.) auto-keep their format; no nee