Back to skill

Security audit

academic-paper-writer

Security checks for vulnerabilities and agentic risk

Overview

This academic-writing skill is purpose-aligned, but it can access and modify a personal Zotero library and uses unsafe command templates with insufficient user-facing safeguards.

Install only in the intended JD workspace. Treat Zotero searches and PubMed/API lookups as potentially revealing research topics, use a least-privilege Zotero key, and require the agent to preview and get confirmation before any add-doi library change. Prefer structured tool calls or argument arrays over copying the shell command templates directly.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:33
Finding

Shell Command Injection Through Zotero Search Terms

Content
View full analysis
" --limit 10 ``` ### Technical Analysis The skill instructs the agent to place search terms inside a shell command represented as a command string. Search terms originate from the user's research topic and therefore cannot be trusted. Double quotes do not provide adequate protection when an untrusted value may itself contain quotation marks, command substitutions, or other shell metacharacters. If the agent constructs this text and executes it through a shell, crafted search terms can terminate the quoted argument and introduce additional shell syntax. The injected command would execute with the same operating-system identity and permissions as the agent process. ### Attack Path 1. An attacker supplies a research topic or keyword containing quotation marks and shell-control syntax. 2. The agent substitutes that value for `` without strict validation or shell-safe argument handling. 3. The resulting text is passed to a shell. 4. The shell interprets part of the supplied value as command syntax rather than as a single search argument. 5. Attacker-selected commands execute under the agent's local account. ### Impact Assessment Successful exploitation could permit arbitrary command execution with the agent's privileges. Depending on that account's access, an attacker could read or modify workspace files, access local Zotero data, obtain credentials available to the process, alter paper content, or invoke network-accessible resources. The instruction does not itself confer elevated operating-system privileges, so the ultimate scope is bounded by the executing account. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:39
Finding

Command Injection and Credential Exposure in Zotero API Fallback

Content
View full analysis
/items?q=&limit=10&format=json" \ -H "Zotero-API-Key: " ``` ### Technical Analysis The fallback command places a dynamic query and user identifier directly inside a double-quoted shell argument. If either substituted value contains a quotation mark or shell-evaluated syntax, it can alter the command interpreted by the shell. The query is also not explicitly URL-encoded, allowing malformed or attacker-controlled values to change the request's query parameters. The Zotero API key is supplied directly as a command-line argument. Depending on the execution environment, command arguments may be exposed in process listings, agent execution logs, debugging output, shell history, or audit telemetry. Although the request targets the official Zotero API, the method used to construct and execute it does not safely isolate untrusted data or protect the credential. ### Attack Path 1. An attacker supplies a crafted literature-search query or user identifier. 2. The agent interpolates the value into the documented `curl` command. 3. If the command is executed through a shell, crafted quoting or shell syntax can escape the intended URL argument. 4. The shell executes injected commands with the agent's privileges. 5. Separately, the Zotero API key may be captured from process metadata or command logs generated during execution. 6. A disclosed key can then be used according to the permissions assigned to that Zotero credential. ### Impact Assessment The injection issue could lead to arbitrary command execution within the agent account's permission boundary. Potential consequences include access to local files, workspace modification, theft of available credentials, or unauthorized ...[truncated 317 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:98
Finding

Shell Command Injection Through DOI and Collection Arguments

Content
View full analysis
--collection ``` ### Technical Analysis Both the DOI and collection name are inserted as unquoted shell arguments. These values may originate from external literature records, user input, or model-generated text. Shell metacharacters, whitespace, command separators, redirection operators, and substitutions in either value may therefore be interpreted by the shell instead of being passed literally to `zotero_helper.py`. The collection field is particularly likely to contain spaces or punctuation even during ordinary use, making the command unreliable without malicious input. With adversarial input, the same parsing weakness can become command injection. ### Attack Path 1. An attacker causes a crafted DOI or collection name to appear in user input or imported citation metadata. 2. The agent inserts the value into the documented command without validation or argument-safe invocation. 3. The command is executed through a shell. 4. The shell splits or interprets the malicious value as additional arguments, redirections, or commands. 5. Injected commands run with the privileges of the agent process. ### Impact Assessment Exploitation could allow arbitrary command execution under the local agent account. This may expose local paper drafts, Zotero records, workspace files, and credentials readable by that account. An attacker could also alter or delete local information or add misleading records to the Zotero library. No evidence shows direct privilege escalation beyond the executing account. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes broad natural-language phrases such as requests to help write a paper or specific sections, which can cause the skill to activate in situations where the user did not intend Zotero lookup or other tool use. Over-broad activation increases the chance of unintended external queries or persistent actions being performed from ordinary conversation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to query a local Zotero helper, call the Zotero web API with an API key, and optionally write new references into the library, but it provides no user-facing notice about privacy, outbound data transfer, or persistent modification. This is dangerous because research topics, draft context, and search terms may disclose unpublished work or sensitive projects, and writes can change the user's library state without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill explicitly instructs use of the Zotero API over the network, which is an external transmission of user-derived search queries and potentially sensitive research intent. In the context of academic writing, those queries can reveal unpublished topics, institutional work, or collaborator interests, making outbound transmission a real privacy concern even if the destination service is legitimate.

Content

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

Si zotero_helper.py search no existe, usa la API Zotero directamente:

bash
curl -s "https://api.zotero.org/users/<USER_ID>/items?q=<query>&limit=10&format=json" \
  -H "Zotero-API-Key: <KEY>"

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill goes beyond read-only citation lookup and drafting by instructing the agent to persistently modify the user's Zotero library via add-doi. That creates a side effect in a personal knowledge base without any explicit confirmation, preview, or guardrail, which can pollute bibliography data and alter future research workflows.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Persistent modification of a bibliography database is not necessary for basic writing assistance and introduces integrity risk to the user's reference library. If triggered incorrectly or with hallucinated/low-quality citations, the agent could silently insert bad references that affect later papers and literature searches.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Line L022 specifies "default: español médico formal," which imposes a language and register preference unless the user overrides it. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy concern unless the constraint is clearly justified or optional by default.

Content

No source excerpt is available for this finding.