Back to skill

Security audit

arXiv Search Master

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent arXiv research purpose, but unsafe path handling can let crafted input write files outside the chosen output directory.

Install only in an isolated environment and avoid processing untrusted JSONL or metadata files until filenames and arXiv IDs are validated and output paths are constrained. Review output directories, avoid --no-skip-existing unless intentional, and prefer pinned dependencies before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_search.py:152
Finding

Batch Query Names Permit Arbitrary File Writes Through Path Traversal

Content
View full analysis
None: filepath = Path(filepath) filepath.parent.mkdir(parents=True, exist_ok=True) with open(filepath, "w", encoding="utf-8") as f: json.dump(data, f, indent=indent, ensure_ascii=ensure_ascii, default=str) ``` ### Technical Analysis The `name` property comes directly from an input JSONL query specification. It is used as part of an output path without rejecting absolute paths, path separators, or `..` components. `pathlib.Path` does not automatically restrict a joined path to its intended parent directory. For example, a name such as `../../outside/result` produces: ```text /../../outside/result.json ``` The operating system resolves the traversal components before the file is written. In addition, `save_json()` creates missing parent directories and opens existing files with mode `"w"`, allowing them to be truncated and replaced. ### Attack Path 1. An attacker supplies or modifies a batch-search JSONL file. 2. The attacker sets the query name to a traversal value, such as: ```json {"query":"machine learning","name":"../../target"} ``` 3. The victim runs: ```bash python scripts/batch_search.py --input malicious.jsonl --output output/metadata ``` 4. The search succeeds, preserving the malicious `query_name`. 5. The program constructs `output/metadata/../../target.json`. 6. `save_json()` resolve ...[truncated 576 chars]
Remediation
View remediation
Path: if not isinstance(query_name, str): raise ValueError("Query name must be a string") safe_name = re.sub(r"[^A-Za-z0-9_-]", "_", query_name).strip("_") if not safe_name: raise ValueError("Query name does not contain a valid filename") base = output_dir.resolve() destination = (base / f"{safe_name}.json").resolve() if destination.parent != base: raise ValueError("Output path escapes the configured directory") return destination ``` Apply this validation before every individual-result write. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/summarize.py:397
Finding

Unvalidated arXiv IDs Permit Output-Directory Traversal

Content
View full analysis
Remediation
View remediation
str: value = parse_arxiv_id(value).strip() if not (MODERN_ID.fullmatch(value) or LEGACY_ID.fullmatch(value)): raise ValueError("Invalid arXiv identifier") return value def arxiv_id_filename(value: str) -> str: canonical = validate_arxiv_id(value) return canonical.replace("/", "_") ``` Use the safe filename representation in both `download.py` and `summarize.py`, followed by a resolved-path containment check. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/metadata.py:224
Finding

CSV Metadata Export Is Vulnerable to Spreadsheet Formula Injection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download.py:155
Finding

PDF Downloads Lack Size and Content Validation

Content
View full analysis
0: with tqdm( desc=filename, total=total_size, unit="iB", unit_scale=True, unit_divisor=1024, leave=False, ) as pbar: for chunk in response.iter_content(chunk_size=self.chunk_size): size = f.write(chunk) pbar.update(size) else: for chunk in response.iter_content(chunk_size=self.chunk_size): f.write(chunk) ``` ### Technical Analysis The downloader streams response data until the server ends the connection. `Content-Length` is used only for progress display and is not treated as an enforced limit. If the header is missing, incorrect, or deceptively small, the program continues writing without a byte cap. The downloader also does not verify: - That the response's media type is a PDF. - That the payload starts with a valid PDF signature. - That the final size falls within a configured limit. - That sufficient disk space is available. A request timeout does not bound the total body size; a server can continue sending data while satisfying read-timeout behavior. ### Attack Path 1. The downloader requests an arXiv PDF URL. 2. A compromised upstream, unsafe TLS configuration, proxy, or abnormal redirect endpoint returns a very large or indefinite response. 3. The response either omits `Content-Length` or supplies a value that is not enforced. 4. The streaming loop writes every received chunk. 5. The destination filesystem fills or the proces ...[truncated 580 chars]
Remediation
View remediation
MAX_PDF_BYTES: raise ValueError("PDF exceeds maximum permitted size") written = 0 with open(temp_path, "wb") as f: for chunk in response.iter_content(chunk_size=self.chunk_size): if not chunk: continue written += len(chunk) if written > MAX_PDF_BYTES: raise ValueError("Downloaded content exceeds maximum permitted size") f.write(chunk) ``` After downloading, verify the signature before moving the temporary file to its final destination. ]]>

T08 · Insecure Dependencies

Warning
Location
requirements.txt:4
Finding

Broad Unpinned and Unused Dependencies Expand the Supply-Chain Attack Surface

Content
View full analysis
=1.4.8 requests>=2.28.0 urllib3>=1.26.0 pandas>=1.5.0 numpy>=1.23.0 PyYAML>=6.0 tqdm>=4.64.0 PyPDF2>=3.0.0 pdfminer.six>=20221105 python-dateutil>=2.8.0 colorlog>=6.7.0 click>=8.1.0 ``` ### Technical Analysis Minimum-only version constraints allow future package and transitive-dependency releases to be selected without review. The absence of cryptographic hashes means package artifacts are not verified against a known approved set, and the absence of a lock file makes installations non-reproducible. Static import review found direct use of `arxiv`, `requests`, `tqdm`, and optional `colorlog`. The included implementation does not import pandas, numpy, PyYAML, PyPDF2, pdfminer.six, python-dateutil, or click. Installing these unused packages unnecessarily increases the number of package artifacts and transitive dependencies that execute installation logic or become available to the runtime. No specific malicious dependency was identified in the audited files. The risk arises from the broad, mutable, and unnecessary installation surface. ### Attack Path 1. A user follows the documented installation command. 2. `pip` resolves any versions satisfying the minimum constraints from the configured package index. 3. Future or compromised releases and their transitive dependencies may be selected because no reviewed upper versions, lock file, or hashes constrain resolution. 4. Package installation or build logic executes with the privileges o ...[truncated 690 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (34)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README is entirely presented in Chinese and does not indicate that other languages are supported or that the Chinese-only presentation is an intentional, justified locale restriction. Per the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · arxiv_search.py (reported line 69)May include surrounding context.

python
# 执行模块
    import subprocess

    return subprocess.call([sys.executable] + new_argv)


if __name__ == "__main__":

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language strings and documentation that require Chinese comprehension for safe use, including argument explanations and operational behavior. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a natural-language policy issue because the file forces a single locale for descriptions and operational messages. Users who do not read Chinese are not given an alternative language option or any documented opt-in to this locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language documentation, help text, and runtime messages that force a specific language/locale for users. Under the policy, language constraints should be optional or clearly justified; here no user opt-in or region-specific justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python skill uses Chinese throughout its module docstring, CLI help text, and output strings, which imposes a specific language on users. The file does not offer any language selection or explain that the tool is intentionally limited to a Chinese-speaking context, so it conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language documentation and comments that force a specific language/locale experience without offering an alternative or explaining a region-specific requirement. Under the language/locale policy, hard-coding one language without user opt-in is a policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file documents commands that download PDFs and save outputs to local files and directories, but it does not include any warning or disclosure about creating files on disk or performing bulk downloads. Under the markdown-specific warning criterion, user-facing documentation should mention behaviors that affect local data or system state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file describes downloading PDFs from arXiv and saving them to local output directories, including an option to overwrite existing files with --no-skip-existing. While the behavior is functionally documented, there is no explicit warning section calling out that the skill performs network requests and writes files to disk, which could affect user data or system state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The workflow example instructs users to create query files, write search results, download PDFs, generate overview JSON, and export BibTeX, all of which modify the local filesystem. Although these actions are shown in examples, the markdown does not include a user-facing warning about the volume of generated files or the need to choose safe output locations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The user-facing natural-language content in the module docstring, CLI description, help text, and examples is entirely in Chinese, with no indication that other languages are supported or optional. This creates a locale/language policy issue because the skill implicitly forces a specific language for interaction without offering user choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This requirements file includes multiple natural-language comments in Chinese (for example, dependency section headers), which imposes a specific language choice on readers without offering an alternative or documenting a locale-specific purpose. Under the policy rule for language or locale constraints, this is a natural-language policy issue because the file gives no indication that Chinese is required or optional.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Using a lower-bound specifier like arxiv>=1.4.8 allows future installs to resolve to different versions over time, making builds non-reproducible and potentially pulling in vulnerable or incompatible releases. In a skill that depends on external packages and remote API access, this weakens supply-chain assurance even though it is not direct code execution by itself.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
# arXiv Search Skill Dependencies

# 核心 arXiv API
arxiv>=1.4.8

# HTTP 请求
requests>=2.28.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

requests>=2.28.0 is not pinned, so installations may silently select different future versions, including releases later found vulnerable. Because this package handles outbound HTTP and may process credentials, transport settings, and redirects, dependency drift increases the security risk of the skill's network operations.

Content

Scanner excerpt · requirements.txt (reported line 7)May include surrounding context.

text
arxiv>=1.4.8

# HTTP 请求
requests>=2.28.0
urllib3>=1.26.0

# 数据处理

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The manifest references requests without an exact version, and the package has multiple known advisories across versions. Without pinning, it is impossible to verify whether deployed environments are selecting a fixed release or an affected one, leaving network behavior and credential handling security uncertain.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

urllib3>=1.26.0 permits unbounded version selection, which undermines reproducibility and can expose the skill to future vulnerable resolver outcomes. Since urllib3 is core HTTP infrastructure, flaws in redirect handling, decompression, TLS, or proxies could materially affect security when the skill fetches remote content.

Content

Scanner excerpt · requirements.txt (reported line 8)May include surrounding context.

text
# HTTP 请求
requests>=2.28.0
urllib3>=1.26.0

# 数据处理
pandas>=1.5.0

Unverifiable Dependency: urllib3 has 16 known advisory(ies) (CVE-2025-66471 (urllib3 streaming API improperly handles highly compressed data); CVE-2024-37891 (urllib3's Proxy-Authorization request header isn't stripped during cross-origin ); CVE-2026-21441 (Decompression-bomb safeguards bypassed when following HTTP redirects (streaming ) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
98% confidence
Finding

urllib3 has numerous advisories, and because the dependency is not pinned, the actual installed version cannot be verified as safe. Given this library's role in HTTP transport, proxy handling, redirects, and decompression, unresolved version ambiguity can directly affect the safety of remote content retrieval.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

pandas>=1.5.0 is unpinned, making the environment non-deterministic and reducing confidence that the installed version has been tested or vetted for security. The direct risk is lower than for network-facing packages, but unpinned data-processing libraries can still introduce vulnerable transitive behavior or unsafe parsing features over time.

Content

Scanner excerpt · requirements.txt (reported line 11)May include surrounding context.

text
urllib3>=1.26.0

# 数据处理
pandas>=1.5.0
numpy>=1.23.0

# YAML 配置

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

pandas has known historical advisories, and the unpinned requirement prevents confirming whether affected versions might be installed. The practical impact here is lower than for transport or parser libraries, but unverifiable versions still represent weak dependency governance.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

numpy>=1.23.0 does not lock installs to a specific release, so future environments may resolve unpredictably. While the package is primarily computational, supply-chain and parser/memory-safety concerns still make unpinned versions an avoidable risk.

Content

Scanner excerpt · requirements.txt (reported line 12)May include surrounding context.

text
# 数据处理
pandas>=1.5.0
numpy>=1.23.0

# YAML 配置
PyYAML>=6.0

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

Because numpy is not pinned, the environment may resolve to versions with known advisories or other unreviewed behavior. Even though exploitation paths may be narrower in this context, the inability to verify the installed version is a real supply-chain weakness.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

PyYAML>=6.0 is unpinned, which is particularly concerning because YAML libraries have a history of unsafe deserialization issues. Even if the current code uses safe loaders, allowing uncontrolled version drift reduces assurance that future installs retain safe defaults and fixes.

Content

Scanner excerpt · requirements.txt (reported line 15)May include surrounding context.

text
numpy>=1.23.0

# YAML 配置
PyYAML>=6.0

# 并行处理
tqdm>=4.64.0

Unverifiable Dependency: PyYAML has 8 known advisory(ies) (CVE-2019-20477 (Deserialization of Untrusted Data in PyYAML); CVE-2020-1747 (Improper Input Validation in PyYAML); CVE-2020-14343 (Improper Input Validation in PyYAML) +5 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
98% confidence
Finding

PyYAML has a significant history of deserialization-related advisories, and the unpinned manifest makes it impossible to confirm that only safe releases are installed. In any skill that may consume YAML configuration, this context makes unverifiable versioning more dangerous than a generic library drift issue.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

tqdm>=4.64.0 is unpinned, so builds may vary over time and pick up vulnerable or behavior-changing releases. The package is lower risk than core network or parser libraries, but it still expands the attack surface and weakens software supply-chain control.

Content

Scanner excerpt · requirements.txt (reported line 18)May include surrounding context.

text
PyYAML>=6.0

# 并行处理
tqdm>=4.64.0

# PDF 处理
PyPDF2>=3.0.0

Unverifiable Dependency: tqdm has 4 known advisory(ies) (CVE-2024-34062 (tqdm CLI arguments injection attack); CVE-2016-10075 (TDQM Arbitrary Code Execution); CVE-2016-10075 (The tqdm._version module in tqdm versions 4.4.1 and 4.10 allows local users to e) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
87% confidence
Finding

tqdm has known advisories and the dependency is not pinned, so the actual installed version cannot be trusted as reviewed. The contextual risk is limited, but leaving even lower-risk packages unverifiable contributes to weak supply-chain controls.

Content

No source excerpt is available for this finding.