T09 · Insecure Skill Coding Practices
- Location
SCRIPTS/render_formulas.sh:152- Finding
Arbitrary Python Code Execution Through Formula Content and Output Names
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
Papyrus has a coherent paper-to-PDF purpose, but its scripts process untrusted paper content and user paths in ways that can execute code or leak formula content to third parties.
Install only in a constrained workspace and avoid using it on private or sensitive papers until the scripts are fixed. Prefer local-only formula rendering, review downloaded arXiv sources as untrusted, avoid attacker-controlled paths or filenames, and do not enable the agent adapters in a privileged or credential-rich environment.
SCRIPTS/render_formulas.sh:152Arbitrary Python Code Execution Through Formula Content and Output Names
SCRIPTS/render_figures.sh:43Arbitrary Python Code Execution Through Archive-Controlled PDF Filenames
SCRIPTS/build_pdf.sh:26Arbitrary Python Code Execution and Unrestricted Resource Loading During PDF Generation
platforms/codex/papyrus-tool.yaml:19Shell Command Injection in Codex Tool Definitions
platforms/open-code/papyrus-config.yaml:17Shell Command Injection in Open Code Tool Definitions
SCRIPTS/fetch_arxiv.sh:28Unsafe Extraction of Untrusted arXiv Source Archives
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<meta name="description" content="{{PAPER_SHORT_DESC}}">
<meta name="keywords" content="{{PAPER_KEYWORDS}}">
<meta name="generator" content="Papyrus">
<!--
Design system adapted from Kami (docs.openclaw.ai)
Colors, spacing, font stacks, and wireframe patterns
used under MIT license.
The fallback to codecogs.com means formula contents may be sent to an external third-party service, yet the skill gives no warning or consent step. Papers, drafts, or user-provided formulas can contain unpublished, proprietary, or sensitive material, so undisclosed exfiltration to a third party creates a meaningful confidentiality risk.
Line L19 requires a Chinese translation as part of the review checklist, which imposes a specific language/locale outcome. The file does not indicate that this is optional, user-selected, or justified as a region-specific requirement, so it conflicts with the language/locale policy rule.
The README explicitly states that formulas may be rendered via codecogs.com, which implies transmitting paper-derived content to a third-party service. Even if the content is 'just formulas,' academic manuscripts can be unpublished, proprietary, or sensitive, and the documentation does not clearly warn users that content may leave the local environment.
When local rendering is unavailable, the script sends the full LaTeX formula to latex.codecogs.com. If formulas contain proprietary, sensitive, or user-supplied data, this creates an external data disclosure path to a third party, which is risky given the skill context does not establish that network transmission is expected or approved.
The online fallback silently transmits formula contents to a third-party service without an explicit warning or consent step. Even if the formulas seem harmless, user input may include confidential research, internal notation, or embedded secrets, making the undisclosed disclosure a meaningful privacy and compliance risk.
The script sets LANGUAGE="zh-CN" as the default locale, and the usage text repeats that default. This imposes a specific language choice unless the user explicitly overrides it, which is a natural-language locale policy concern when no opt-in or justification is provided.
The file describes the output as inherently bilingual and specifically includes Chinese translation, and L11 further specifies paragraph-by-paragraph Chinese translation. Because this language behavior is presented as mandatory rather than optional, it may violate language/locale policy unless users are given a choice or the Chinese-only requirement is explicitly justified.
The skill explicitly states that commentary is enriched by web research and also downloads from arXiv and codecogs, but it does not clearly frame these as external network requests triggered by user-supplied paper inputs. This can leak sensitive user interests, internal document content, or derived queries to third-party services, especially when local PDFs or proprietary papers are processed under the same workflow assumptions.
The SOP explicitly permits falling back to an online rendering service for formulas, which sends formula content to a third party without requiring user notice, consent, or data classification checks. In a paper-processing workflow, formulas may contain unpublished research, proprietary notation, or sensitive technical content, so this creates a real confidentiality and supply-chain exposure.
The document hard-codes bilingual output with a Chinese translation block and Chinese figure/formula captions, and the table guidance also requires bilingual headers. Although output preferences earlier mention confirming language, these later mandatory instructions enforce a specific locale rather than clearly making it optional based on user preference.
The HTML root sets lang="zh-CN", and the template consistently uses Chinese-only visible labels such as 逐段精读, 原始论文, and 编译说明. Because this file is a general template and does not provide any opt-in or alternative locale handling, it appears to impose a specific language/locale in a way that conflicts with the stated policy.
The skill explicitly instructs fetching content from arXiv and conducting web research, but it does not disclose that using the skill will trigger external network access. This can surprise users, violate least-surprise/privacy expectations, and cause data-handling or policy issues in restricted environments.
The description mandates a specific bilingual English and Chinese output format rather than offering language selection. This can violate language/locale policy expectations because the skill forces a particular language combination without documented user opt-in or justification.
The manifest advertises network access, archive extraction, file conversion, and output writes, but does not warn users about those side effects or constrain destinations. In an agent setting, this can lead to unexpected downloads, processing of untrusted paper sources, and filesystem modifications, increasing the chance of unsafe handling of attacker-controlled content or surprising system changes.
The manifest explicitly says the skill produces output with EN→CN translation, which imposes a specific language transformation by default. There is no indication that users can opt in to Chinese output, select another locale, or that the language restriction is required for a documented region-specific purpose.
The tool is presented as a paper-processing utility, but its core behavior is to execute a local shell script via bash from a user-writable home-directory path. In an agent-tool context, that increases risk because the effective behavior depends on external script contents that are not visible here, creating an opaque execution boundary that could perform arbitrary actions on the host.
The _run method invokes a bash subprocess to execute an external script, which is a safety-relevant operation for code files. While the docstring says it executes a CLI command, there is no visible confirmation prompt, logging, or warning to the user that shell execution will occur.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def _run(self, *args, timeout: int = 300) -> str:
"""Execute a papyrus CLI command."""
cmd = ["bash", self.cli, *args]
result = subprocess.run(
cmd, capture_output=True, text=True, timeout=timeout
)
if result.returncode != 0:
The tool provides commands that write extracted sources, generated PNGs, and output PDFs to user-specified directories and files, but the code offers no confirmation prompt or user-facing disclosure at the point of execution. Although the docstrings describe outputs, they do not clearly warn that these methods will create or overwrite filesystem contents in the supplied paths.
The module exposes a generic command-dispatch interface driven by user input, which broadens the accessible surface beyond the documented safe operations. In a tool/agent ecosystem, this is more dangerous because external orchestrators may treat the interface as trustworthy and pass through attacker-influenced command names, enabling invocation of unintended methods.
The natural-language description states that the tool produces a bilingual PDF with an English original plus Chinese translation, which implies a fixed language choice. Under the policy, forcing a specific language or locale without user opt-in is a violation unless the constraint is explicitly justified or optional.
This manifest defines multiple runnable commands and a workflow that downloads content, extracts files, converts assets, and builds output files under user-supplied paths, all via shell-style run strings. While these operations are central to the tool, the manifest provides no explicit warning, confirmation, or user-facing disclosure about filesystem changes, downloads, or command execution.
The trigger list uses natural-language descriptions such as "User asks to deep-read or annotate a paper" and "User provides an arXiv URL" without clear constraints or exclusion conditions. These broad conditions could cause the skill to activate for ordinary paper-related conversations, not just explicit requests to run this pipeline.
The pipeline explicitly downloads external arXiv content and later delivers generated output, but the manifest contains no user-facing notice or consent step about network access, remote content retrieval, or handling of potentially sensitive URLs and derived files. This can lead to unexpected external requests, privacy surprises, and processing of untrusted remote content without transparent user awareness.
No suspicious patterns detected.