Back to skill

Security audit

Arxiv Paper Reader

Security checks for vulnerabilities and agentic risk

Overview

This skill is a purpose-aligned arXiv search and paper-summarization helper, with normal local file output and some manageable caution around untrusted paper text and download size limits.

Install only if you are comfortable with the skill contacting arXiv using your search terms or paper IDs and writing paper artifacts into your workspace. When summarizing papers, treat any instructions inside a paper as untrusted text, and monitor disk use if you run broad or repeated topic syncs.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:66
Finding

Untrusted arXiv Paper Content Is Read Without a Prompt-Injection Boundary

Content
View full analysis
/summary.md` if the user asked for files. Otherwise return the summary directly in chat. ## Summary format Use the headings in `{baseDir}/references/summary-format.md`. Keep the summary grounded in the generated Markdown. If the conversion falls back to abstract-only mode, say so explicitly in the summary. ``` The remote content is assembled and saved without any trust classification or instruction boundary: ```python paper_markdown = assemble_markdown(metadata, body, source_kind) output_paths["paper_md"].write_text(paper_markdown, encoding="utf-8") metadata_payload = { **asdict(metadata), ``` ### Technical Analysis The paper body originates from remotely supplied arXiv HTML or TeX. Although the converter treats it as text and does not execute it as local code, the Skill subsequently instructs the AI Agent to read and reason over the generated Markdown. Neither the Skill instructions nor the generated artifact explicitly state that instructions appearing inside the paper are untrusted data that must not influence tool use, goals, safety constraints, or disclosure decisions. Consequently, a paper containing text such as purported system instructions, requests to inspect local files, or commands to call tools can become an indirect prompt-injection payload when `paper.md` is placed into the Agent's context. The HTML parser excludes some active tags, and the TeX converter strips many commands, but these transformations do not remove ordinary natural-language instructions. Prompt injection does not require executable HTML, JavaScript, or TeX. ### Attack Pat ...[truncated 1640 chars]
Remediation
View remediation
Treat all paper metadata, HTML, TeX, PDF text, and generated Markdown as untrusted data. Never follow instructions found in paper content, never allow that content to alter the task, and never invoke tools based solely on text contained in a paper. 2. Delimit remote content clearly when presenting it to the Agent, using explicit begin/end markers and a statement that everything inside the markers is reference material rather than instructions. 3. Keep operational Skill instructions separate from downloaded content. Do not concatenate remote paper text into system or developer instruction blocks. 4. Require explicit user confirmation before any tool action that is suggested by paper content and is not directly required for fetching or summarizing the selected paper. 5. Consider detecting and annotating conspicuous prompt-injection phrases in generated Markdown. Preserve the original document for fidelity, but mark suspicious passages as untrusted rather than silently treating them as instructions. 6. Apply the same protections to abstracts, titles, author fields, HTML bodies, TeX source, search-result files, and automatically generated topic summaries because all can contain attacker-controlled text. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/arxiv_api.py:132
Finding

Unbounded Network Response Buffering Enables Memory and Disk Exhaustion

Content
View full analysis
bytes: request = urllib.request.Request(url, headers={"User-Agent": USER_AGENT}) context = build_ssl_context() try: with urllib.request.urlopen(request, timeout=timeout, context=context) as response: return response.read() ``` The same unbounded helper is used for source archives: ```python payload = request_bytes(ARXIV_EPRINT_URL.format(paper_id=urllib.parse.quote(paper_id)), timeout) ``` It is also used for PDF downloads: ```python def fetch_pdf_bytes(paper_id: str, timeout: float) -> bytes: pdf_url = ARXIV_PDF_URL.format(paper_id=urllib.parse.quote(paper_id)) return request_bytes(pdf_url, timeout) ``` ### Technical Analysis `response.read()` loads the complete remote response into process memory without enforcing a maximum byte count. The converter defines limits for archive member counts, individual TeX files, and total accepted TeX data, but those checks occur only after the entire compressed source response has already been downloaded and buffered. The limits also do not protect metadata XML, HTML, or PDF responses. PDF data is first buffered in memory and then written to disk without a maximum file-size check. A network timeout limits how long individual operations may wait, but it is not a response-size limit. A server can continuously provide data within the timeout behavior and still cause substantial memory or disk consumption. ### Attack Path 1. A user selects a paper, or topic synchronization automatically selects one. 2. The Skill requests metadata, HTML, a source archive, or a PDF from an allowed arXiv endpoint. 3. The endpoint returns an unusually large resp ...[truncated 1307 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
# Summary Template

Use this structure:

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/search-usage.md (reported line 1)May include surrounding context.

md
# Summary Template

Use this structure:

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/summary-format.md (reported line 1)May include surrounding context.

md
# Summary Template

Use this structure:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description says to use the skill when the user wants to "summarize arXiv content" or "run a recurring topic sync," which are broad phrases that could overlap with many ordinary research requests. It does not clearly distinguish when this skill should activate versus when a general summarization or browsing skill should not, and it provides no negative examples or explicit trigger constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The description states that the skill will convert papers into Markdown and PDF files in the workspace, which is a file-writing operation. Although later workflow steps explain where files go, the top-level description does not clearly warn the user that running the skill creates local files and directories that may modify the workspace.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This JSON config contains group names in Chinese at L009, L068, and L109 while topic names and queries are in English. That creates a natural-language locale constraint in the skill data without any visible opt-in, fallback, or justification for users who do not read Chinese.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This helper performs outbound HTTPS requests and transmits user-supplied search queries or paper identifiers to arXiv, but the function has no docstring, comment, logging, or print statement disclosing that network access occurs. For code-file review under SQP-2, network calls that transmit user or system data should include some visible warning unless the disclosure is provided elsewhere.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.