Back to skill

Security audit

Scientific and Technological Novelty Search Report Review

Security checks for vulnerabilities and agentic risk

Overview

This skill has a legitimate report-review purpose, but its fallback document-reading instructions can turn a user-supplied file path into executable Python and it under-discloses a claimed Baidu Scholar research basis.

Install only if you are comfortable with the agent reading the supplied report and potentially using local command-line extraction tools. Avoid using this skill on untrusted file paths or sensitive reports unless the fallback command is rewritten to pass paths as arguments and external Baidu Scholar checks are made explicit and user-approved.

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

Error
Location
SKILL.md:34
Finding
Arbitrary Python Code Execution Through Unsafe File Path Interpolation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 34–44 **Vulnerability Type**: Command and code injection through unsafe interpolation **Risk Level**: High The vulnerable instruction provides the following fallback extraction command. The file-path placeholder is rendered in English below for consistency: ```bash python -c " from docx import Document doc = Document(r'<FILE_PATH>') for p in doc.paragraphs: print(p.text) for table in doc.tables: for row in table.rows: print('\t'.join(cell.text for cell in row.cells)) " ``` ### Technical Analysis The Skill instructs the Agent to replace a placeholder embedded directly inside Python source code with a user-provided document path. The path is placed within a raw single-quoted Python string: ```python doc = Document(r'<FILE_PATH>') ``` Raw strings do not prevent quote termination. A crafted path containing a single quote can close the string literal and introduce attacker-controlled Python expressions or statements. Because the entire generated program is supplied to `python -c`, injected Python runs with the same operating-system identity, environment, working directory, file access, and network access as the Agent process. The surrounding shell command also creates an additional parsing layer. Depending on how the Agent performs substitution, shell-sensitive content in the path may produce further command-construction hazards. This issue does not independently elevate operating-system privileges. Its severity arises from converting an otherwise passive document path into executable code under the Agent's existing privileges. ### Attack Path 1. An attacker supplies a novelty-report document with a deliberately crafted filename or recommends a crafted path to the Agent. 2. The normal document-reading operation fails, returns corrupted text, or appears incomplete, causing the documented fallback procedure to be used. 3. The Agent substitutes the attacker-controlled path ...[truncated 1213 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Never interpolate a user-controlled path into Python source code or a dynamically constructed shell command. Pass the path as a separate positional argument: ```bash python -c ' import sys from pathlib import Path from docx import Document path = Path(sys.argv[1]).resolve(strict=True) if path.suffix.lower() != ".docx": raise ValueError("Only DOCX files are accepted") doc = Document(path) for paragraph in doc.paragraphs: print(paragraph.text) for table in doc.tables: for row in table.rows: print("\t".join(cell.text for cell in row.cells)) ' -- "$FILE_PATH" ``` Apply the following additional controls: 1. Invoke processes with an argument array rather than through a shell whenever the tool API supports it. 2. Canonicalize the path and require it to remain within an approved workspace directory. 3. Reject unexpected extensions, symbolic links where inappropriate, non-regular files, and paths outside the project workspace. 4. Use a fixed, reviewed extraction script instead of generating source code dynamically. 5. Run document extraction in a restricted sandbox with minimal filesystem access, no unnecessary credentials, and no network access. 6. Apply equivalent argument separation and path validation when invoking `antiword`, `textract`, or other fallback utilities. 7. Treat document filenames, paths, and document contents as untrusted input regardless of who supplied them. ]]>
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 (3)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to fall back to Shell commands and Python-based document extraction tools to process local files, but it provides no warning, approval gate, or execution constraints. Running local commands against user-supplied paths increases the risk of unsafe command execution patterns, access to unintended files, and over-collection of sensitive document contents beyond what the user expects.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill’s stated purpose is to review the contents of a user-provided novelty-search report, but the final instruction adds a claim that the review is based on current Baidu Scholar search results. That expands the skill from document review into live external research without an explicit, bounded workflow or user consent, creating a risk of unauthorized data disclosure and misleading output provenance.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
Directing reliance on Baidu Scholar introduces an external search capability that is not necessary for the documented task of reviewing report quality and internal consistency. In practice, this can cause the agent to transmit sensitive technical terms or report-derived details to an external service and produce outputs that appear grounded in live research even when that behavior was not transparently requested.

Static analysis

No suspicious patterns detected.