Back to skill

Security audit

Paper Bilingual

Security checks for vulnerabilities and agentic risk

Overview

This PDF translation skill appears purpose-built, but it should be reviewed because it downloads arbitrary user-provided URLs through a shell command without clear URL safety checks.

Review before installing or using on shared or sensitive systems. Only process trusted PDFs and trusted public URLs, avoid private/internal URLs, use an isolated environment, pin dependencies, and do not translate confidential papers unless sending their text to the session LLM is acceptable.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:22
Finding

Unrestricted URL Retrieval Enables Server-Side Request Forgery and Potential Command Injection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22-31
Vulnerability Type: Unvalidated external URL handling and unsafe command construction
Risk Level: High

powershell
Invoke-WebRequest -Uri "URL" -OutFile "$env:TEMP\paper.pdf"

Technical Analysis

The Skill directs the agent to insert a user-provided URL into a PowerShell command and download its content with Invoke-WebRequest. The documented validation only requires an HTTP or HTTPS URL. It does not restrict destination hosts, resolved IP addresses, ports, redirects, or embedded credentials.

Consequently, an attacker could provide URLs targeting loopback addresses, private network ranges, link-local services, or cloud instance metadata endpoints. Because the downloaded response is subsequently opened and processed as a PDF, content retrieved through the agent may be incorporated into generated output or error messages.

The command is also represented through textual substitution inside a quoted PowerShell command. If the implementation replaces URL directly without safe parameter binding, a URL containing a quote followed by PowerShell syntax could terminate the argument and inject an additional command. The feasibility of command injection depends on how the agent constructs and invokes the documented command, but the instructions provide no escaping or validation requirements.

Attack Path

  1. An attacker asks the Skill to process a crafted HTTP or HTTPS URL.
  2. The URL targets an internal service, loopback interface, private address, link-local address, or cloud metadata endpoint.
  3. The agent executes Invoke-WebRequest from its own network context.
  4. PowerShell retrieves data that the attacker could not access directly and stores it as the temporary PDF.
  5. The Skill attempts to parse, translate, or report errors concerning the retrieved response, potentially exposing internal information through generated output.
  6. If direct ...[truncated 829 chars]
Remediation
View remediation

Remediation Suggestions

  • Parse the supplied URL with a dedicated URL parser rather than inserting raw input into command text.
  • Permit only explicitly supported schemes, normally https.
  • Reject URLs containing user-information components, ambiguous host representations, or unsupported ports.
  • Resolve the hostname before downloading and reject loopback, private, link-local, multicast, reserved, and unspecified IPv4 and IPv6 addresses.
  • Explicitly deny known cloud metadata destinations.
  • Revalidate every redirect target and apply a conservative redirect limit.
  • Consider an allowlist of trusted academic publication domains when operationally feasible.
  • Pass the validated URL as a bound process argument or PowerShell parameter; never construct a shell command through direct string interpolation.
  • Download through a restricted client with connection, response-size, and execution-time limits.
  • Verify that the response is a valid PDF using both content checks and parser validation before further processing.
  • Run network retrieval and PDF parsing in a sandbox without sensitive credentials and with restricted internal-network access.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:184
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 184-185
Vulnerability Type: Unpinned and unhashed runtime dependencies
Risk Level: Medium

text
PyMuPDF (`pip install pymupdf`)
Pillow (`pip install pillow`)

Technical Analysis

The Skill recommends installing PyMuPDF and Pillow by package name without exact version constraints, artifact hashes, a lock file, or an explicit trusted package index. This makes installation non-reproducible and causes the installed code to depend on the package versions and index configuration available at execution time.

Although the documented names correspond to established packages and there is no evidence that either package is malicious, mutable dependency resolution creates a supply-chain exposure. A compromised release, compromised package repository, maliciously configured package index, or dependency-confusion condition could cause unreviewed code to be installed and imported.

Python packages may execute code during build or installation, and imported package code executes within the Python process. Dependency compromise therefore crosses from data processing into local code execution.

Attack Path

  1. An operator follows the documented pip install commands.
  2. pip resolves the packages using the environment's current package-index configuration.
  3. A compromised release, unsafe mirror, or higher-priority attacker-controlled index supplies an unreviewed artifact.
  4. The package executes code during installation, wheel loading, or subsequent import.
  5. The malicious code runs with the privileges of the user operating the Skill.

Impact Assessment

A compromised dependency could execute arbitrary Python or native code with the agent process's privileges. It could access readable project files, generated papers, environment variables, local credentials, and network resources, or modify files writable by that user.

The issue does not independe ...[truncated 148 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin every direct dependency to a reviewed exact version.
  • Maintain a lock file that also fixes transitive dependency versions.
  • Require cryptographic artifact hashes, such as through pip install --require-hashes.
  • Configure installation to use an explicitly trusted package index and disallow unexpected extra indexes.
  • Prefer prebuilt, reviewed wheels from the trusted index and avoid source builds where practical.
  • Install dependencies in an isolated virtual environment or container with minimal privileges.
  • Scan dependencies for known vulnerabilities and update pinned versions through a controlled review process.
  • Separate dependency installation from normal Skill execution so package resolution does not occur each time the Skill is invoked.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description and title specify conversion to bilingual Markdown with Chinese translation, and later instructions require translating English into Chinese. This imposes a fixed language/locale behavior without any opt-in choice, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly downloads a remote PDF and writes files to local storage, but it does not require any user-facing notice or confirmation before performing network access and filesystem modifications. This can surprise users, cause unintended persistence of downloaded content and extracted images, and increase risk when handling untrusted remote documents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill states that extracted paper text will be translated using the current-session LLM, but it does not warn users that document contents may be transmitted to a model service. If the PDF contains unpublished, licensed, or sensitive material, this omission can lead to unintended disclosure of the document text to external processing components.

Content

No source excerpt is available for this finding.