T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:42- Finding
Unverified Remote Installer Is Piped Directly into a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its PubMed search purpose, but its recommended install path runs mutable remote code and the runtime can print PubMed API credentials into logs.
Review before installing. Prefer the documented pip/venv path over curl|sh or unpinned npx, pin or verify dependencies where possible, and avoid setting a PubMed API key unless needed. If you do use a key, treat console output and agent transcripts as potentially sensitive because the tool may print URLs containing the key and email.
SKILL.md:42Unverified Remote Installer Is Piped Directly into a Shell
pubmed_search.py:47PubMed API Key Is Disclosed Through Search URL Logging
requirements.txt:4Mutable and Unpinned Dependencies Create Supply-Chain Exposure
The curl ... | sh pattern is especially dangerous because it combines retrieval and execution into a single opaque step, preventing meaningful inspection before code runs. In a skill README, this increases the chance that users will blindly execute remote shell commands with their local user privileges, enabling full compromise of the workstation if the upstream content is malicious or tampered with.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
cd ~/.claude/skills/pubmed-search-skill
Piping curl output directly into sh creates an immediate command-execution chain with no opportunity for review or integrity checks. In a skill file, this is especially risky because users may copy-paste the command verbatim, turning documentation into a code-execution vector.
Method 1: Using uv (Recommended - Fastest)
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
cd /path/to/pubmed-search-skill
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
print("安装命令: pip install requests")
sys.exit(1)
# 加载 .env 文件
try:
from dotenv import load_dotenv
load_dotenv()
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
print("安装命令: pip install requests")
sys.exit(1)
# 加载 .env 文件
try:
from dotenv import load_dotenv
load_dotenv()
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
print("安装命令: pip install requests")
sys.exit(1)
# 加载 .env 文件
try:
from dotenv import load_dotenv
load_dotenv()
The tool embeds untrusted remote content such as article titles and abstracts directly into a generated analysis prompt without delimiting or sanitizing it. If that prompt is later passed to another LLM, malicious or adversarial text in the paper metadata could perform prompt injection, influencing downstream model behavior, causing instruction override, or inducing leakage of surrounding context and tool outputs.
请基于论文信息进行全面、客观的分析。如果摘要中缺少某些信息,请指出这一点,并根据专业知识提供可能的推断或建议。
"""
return prompt
# ============================================
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
cd ~/.claude/skills/pubmed-search-skill
uv venv
source .venv/bin/activate # Linux/macOS
The skill declares no explicit tool scope even though its content clearly implies network access, file writes, and environment-variable usage. Without a permissions or allowed-tools boundary, an agent may over-grant capabilities or invoke the skill in contexts broader than intended, increasing the chance of unintended data access or side effects.
Natural-language strings throughout the file, including the module description and CLI help, are presented exclusively in Chinese with no option to select another language. This can violate language/locale policy when the skill does not offer user choice or document a justified locale restriction.
The manifest description limits the skill to searching and analyzing biomedical literature. The code adds a separate content-acquisition and local file write capability by fetching PMC PDF files and persisting them under a user-specified directory, which goes beyond search/analysis behavior.
The README instructs users to fetch and execute a remote installer script directly from the network. If the remote host, transport path, or published script is compromised, users may execute attacker-controlled code on their machine during installation.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
cd ~/.claude/skills/pubmed-search-skill
The console and Markdown output examples show user-facing labels in Chinese (for example, 作者, 期刊, 摘要, 搜索结果) even though the rest of the README is in English. This suggests the skill may force a specific output language or locale without user opt-in, which is a natural-language policy concern under the language/locale rule.
The installation instructions fetch and execute a remote script via curl from the network. This is dangerous because compromise of the remote host, DNS, TLS trust chain, or the script itself could lead to arbitrary code execution on the user's machine during setup.
Method 1: Using uv (Recommended - Fastest)
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
cd /path/to/pubmed-search-skill
The activation guidance is broad: it suggests using the skill whenever users request literature search or analysis, without clear boundaries for when network access, downloads, or local file output should occur. In agent environments, vague triggers can cause the skill to run too eagerly and perform unnecessary external requests or file operations.
The skill loads a local .env file and reads environment variables for API configuration and identity data. While this may support API usage, local configuration file access is not part of the stated search/analysis purpose and is an additional capability not described in the manifest.
This code creates the output directory and writes a PDF file to disk, which is a safety-relevant file write operation. Although the function reports progress and the CLI exposes an output directory argument, there is no explicit warning or confirmation about creating files locally or potentially overwriting existing content.
The manifest says the tool is for searching and analyzing PubMed literature, which implies the code performs analysis. In practice, generate_analysis only formats metadata and abstract into a prompt template for a downstream analyst, so the implemented behavior is weaker than the stated capability.
The file’s natural-language comments are written only in Chinese, which imposes a specific language/locale choice without offering an alternative or opt-in. Under the policy, language-only instructions or documentation can be a locale-policy issue when no choice is provided.
The dependency specification uses a lower-bound constraint (requests>=2.31.0) instead of pinning to a known-good version, which makes builds non-reproducible and can silently pull in vulnerable or breaking releases. In a security-sensitive tool that performs HTTP requests, this increases supply-chain risk and makes it hard to verify whether deployed environments are protected from known requests advisories.
# PubMed-Search 依赖列表
# HTTP 请求
requests>=2.31.0
# 环境变量管理 (可选)
python-dotenv>=1.0.0
The manifest references requests without pinning, and the package has multiple known advisories across versions. Because the exact installed version is unknowable from this file, the project may resolve to an affected release, which is especially relevant for a PubMed-search skill that relies on outbound HTTP and could handle credentials, redirects, or session state.
The dependency specification uses python-dotenv>=1.0.0 without an exact pin, so installations may resolve to different versions over time. This weakens reproducibility and can expose the project to supply-chain or known-vulnerability risk if a later resolved version is unsafe.
requests>=2.31.0
# 环境变量管理 (可选)
python-dotenv>=1.0.0
The manifest references python-dotenv without pinning, while advisories exist for some versions. If this optional package is installed in an affected version, environment file handling could introduce local file or configuration risks depending on how the application uses it.
No suspicious patterns detected.