Back to skill

Security audit

Paper Doctor

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its paper-review purpose, but it requests unrestricted command execution without explaining why.

Review before installing because the skill asks for command execution that is not justified by its paper-review workflow. Optional web search is disclosed, but users should avoid enabling it for confidential manuscripts unless they are comfortable sending derived keywords or citation context to external search services.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
skill.md:5
Finding

Excessive Arbitrary Command-Execution Permission

Content
View full analysis

Vulnerability Details

File Location: skill.md, line 5
Vulnerability Type: Excessive privilege and violation of least privilege
Risk Level: Medium

Vulnerable Code

yaml
allowed-tools: [read, write, edit, pdf, exec, web_search, tavily_search, tavily_extract]

Technical Analysis

The Skill declares access to the unrestricted exec tool even though its documented purpose is limited to reading academic papers, generating critiques, editing text, processing PDFs, and optionally searching for literature. None of the documented features establishes a legitimate requirement for arbitrary operating-system command execution.

Granting exec expands the Skill's authority beyond its functional requirements and violates the principle of least privilege. If attacker-controlled manuscript content or contextual instructions influence tool selection, the agent could be induced to execute commands unrelated to paper analysis. The audit found no command-execution payload or explicit malicious instruction in the Skill itself; the risk arises from the unnecessarily broad permission.

Attack Path

  1. The Skill is loaded with the exec tool enabled.
  2. An attacker supplies a manuscript or other analyzed content containing instructions crafted to influence the agent.
  3. The agent treats those untrusted instructions as actionable and invokes exec.
  4. The command runs with the operating-system privileges of the agent process.
  5. Depending on the runtime sandbox and account permissions, the command may read or modify local files, start processes, or interact with accessible system resources.

This path requires both successful manipulation of the agent and a runtime that permits the declared exec capability.

Impact Assessment

Successful exploitation could provide command execution within the security context of the agent process. The accessible scope may include files, processes, environment variables, and network resources available to th ...[truncated 174 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove exec from the allowed tool list:
yaml
allowed-tools: [read, write, edit, pdf, web_search, tavily_search, tavily_extract]
  1. If document conversion genuinely requires an external process, replace unrestricted command execution with a narrowly scoped conversion tool that:

    • Allows only approved binaries and fixed operations.
    • Passes arguments without shell interpretation.
    • Rejects metacharacters and untrusted executable paths.
    • Restricts input and output to a dedicated workspace.
    • Runs under a low-privilege account in a sandbox.
    • Disables network access unless explicitly required.
    • Enforces resource and execution-time limits.
    • Records tool invocations for security review.
  2. Treat manuscript contents as untrusted data and explicitly prohibit instructions embedded in analyzed documents from controlling tools.

  3. Retain optional web-search behavior behind explicit user authorization, as described by the Skill, and constrain searches to the minimum data required.

Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill includes web_search, tavily_search, and tavily_extract, which exceed the default offline review workflow and enable exfiltration or retrieval behaviors not needed for most document critique tasks. Although the skill notes internet use is optional and user-enabled, broad network capabilities still increase risk if the model is induced to send document-derived queries or fetch untrusted remote content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The title and body of the skill description are written entirely in Chinese and present the skill as a Chinese-language expert workflow, but there is no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill includes web_search, tavily_search, and tavily_extract, which exceed the default offline review workflow and enable exfiltration or retrieval behaviors not needed for most document critique tasks. Although the skill notes internet use is optional and user-enabled, broad network capabilities still increase risk if the model is induced to send document-derived queries or fetch untrusted remote content.

Content

No source excerpt is available for this finding.