Back to skill

Security audit

Related Works Report from Paper MDs

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to perform the promised related-works workflow, but it requests broader agent and system authority than the workflow needs.

Install only if you are comfortable giving the skill broad local command, file, web, MCP, and subagent authority while it processes paper markdowns. Use a dedicated WORKDIR outside synced or version-controlled confidential locations, and avoid unpublished or sensitive manuscripts unless Tavily/arXiv title lookup and local intermediate retention are acceptable.

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

Overly Broad Tool Permissions Violate Least Privilege

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:5
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

Complete Code Snippet:

yaml
allowed-tools: Bash(*), Read, Write, Edit, Grep, Glob, Agent, Skill, call_mcp_tool, WebFetch

Technical Analysis

The Skill grants unrestricted shell execution through Bash(*) alongside broad file manipulation, agent delegation, arbitrary web retrieval, MCP calls, and invocation of other skills. This authority exceeds what is minimally necessary for the declared workflow.

The documented pipeline only requires reading specified paper Markdown files, writing artifacts under a user-selected WORKDIR, invoking three bundled Python scripts, querying Tavily, and retrieving metadata from arxiv.org. The permission declaration does not enforce those boundaries. In particular:

  • Bash(*) can execute arbitrary system commands rather than only the bundled scripts and safe directory-creation operations.
  • Read, Write, and Edit are not restricted to the selected inputs and WORKDIR.
  • WebFetch is not restricted to arxiv.org.
  • Skill permits invoking unrelated skills and is not required by the documented pipeline.
  • Agent expands the instruction-processing surface when handling potentially attacker-controlled paper content.

The scripts themselves do not contain malicious command execution. The risk arises from granting the orchestrating agent capabilities beyond the legitimate needs of the task.

Attack Path

  1. An attacker supplies or influences a paper Markdown file, source path, or invocation argument processed by the Skill.
  2. The content contains adversarial instructions presented as document text or workflow guidance.
  3. The agent or a delegated subagent mistakenly treats that untrusted content as instructions.
  4. Because the Skill permits Bash(*), unrestricted file tools, WebFetch, and other skill in ...[truncated 1186 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace Bash(*) with a narrow allowlist covering only:
    • Safe creation of WORKDIR, title_batches, and abstract_batches.
    • Invocation of the three bundled Python scripts with validated arguments.
  2. Restrict read access to the explicitly supplied paper files and bundled Skill resources.
  3. Restrict write and edit access to canonicalized paths beneath WORKDIR; reject traversal and symlink escapes.
  4. Restrict MCP access to the required Tavily operation and network access to Tavily plus HTTPS requests to arxiv.org.
  5. Remove Skill and unrestricted WebFetch unless a concrete workflow requirement justifies them.
  6. If subagents remain necessary, give them only scoped read access and no shell or network authority during citation extraction.
  7. Explicitly declare all source Markdown content, citation text, search results, and fetched pages to be untrusted data whose embedded instructions must never be followed.
  8. Validate and canonicalize all input and output paths before tool invocation, and enforce that generated artifacts remain under WORKDIR.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied code chunk is a narrow formatting utility: it reads an input JSONL, extracts fields such as dedup_id, input_title, arxiv_url, and fetch.abstract, and writes them into a markdown file. It does not perform the core workflow described in the declaration, such as reading paper markdown files, extracting related work sections, resolving citations, deduplicating references, querying Tavily/arXiv, or producing a final related-works report in a work folder. This is a materially different primary purpose, so the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs sending paper titles to Tavily and retrieving arXiv metadata without any user-facing disclosure that citation data and potentially sensitive research topics will be transmitted to an external service. In environments with unpublished, proprietary, or confidential manuscripts, this can leak sensitive metadata outside the local workspace and violate privacy or data-handling expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow persists verbatim Related Works text, citation tables, deduplicated paper lists, normalized citations, fetch logs, and the final report under WORKDIR, but does not warn the user that potentially sensitive source content will be written to disk in multiple derivative forms. This increases the risk of unintended retention, broader local exposure, and accidental inclusion in backups, sync tools, or version control.

Content

No source excerpt is available for this finding.