Back to skill

Security audit

english-vocabulary-helper

Security checks for vulnerabilities and agentic risk

Overview

This vocabulary skill is educational in purpose, but it requires automatic local file creation and opening active HTML without enough filename safety or user control.

Review before installing. Use it only if you are comfortable with the agent creating persistent vocabulary files and opening generated HTML. Avoid entering words or lists from untrusted sources unless the skill is updated to sanitize filenames, stay within the vocabulary directory, avoid overwrites by default, and ask before saving or opening files.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:14
Finding

Path Traversal Through Unsanitized Vocabulary Filenames

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14-26
Vulnerability Type: Path traversal and arbitrary file write
Risk Level: Medium

Vulnerable Instruction Snippet

The following is an English translation of the complete relevant instruction block:

text
Markdown file

Save path: ~/.qclaw/workspace/vocabulary/words/
Filename: {word}.md
Examples: context.md, proceed.md

Interactive HTML learning card

Save path: ~/.qclaw/workspace/vocabulary/words/
Filename: {word}.html
Examples: context.html, proceed.html

Technical Analysis

The skill instructs the agent to place the user-supplied word directly into Markdown and HTML filenames. It does not require validation of the supplied value, removal of path separators, rejection of .. components, filename normalization, or verification that the resolved destination remains beneath the intended vocabulary directory.

If the file-writing implementation follows these instructions literally, a value such as ../../target could resolve outside ~/.qclaw/workspace/vocabulary/words/. Appending .md or .html does not prevent traversal because the directory components are processed before the final filename extension.

This is an insecure filename-construction pattern under T09: Insecure Skill Coding Practices.

Attack Path

  1. An attacker supplies a purported vocabulary word containing path traversal components, such as ../../target.
  2. The skill substitutes that value into {word}.md and {word}.html.
  3. The resulting paths contain parent-directory references.
  4. The file-writing tool resolves the paths outside the intended vocabulary directory.
  5. Existing writable files may be overwritten, or new files may be created at attacker-selected locations.
  6. The effect is limited by the operating-system permissions of the account running the agent.

Impact Assessment

Successful exploitation could provide arbitrary file ...[truncated 521 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat the supplied word as untrusted input and derive a safe basename rather than using it directly.
  2. Allow only explicitly supported characters, such as ASCII letters, hyphens, and apostrophes, or apply a carefully defined Unicode-letter policy.
  3. Reject /, \, null bytes, control characters, absolute paths, drive prefixes, and . or .. path components.
  4. Apply a reasonable maximum filename length.
  5. Resolve the destination to a canonical path and verify that it remains beneath the canonical vocabulary directory before writing.
  6. Construct paths with a safe path-joining API rather than string concatenation.
  7. Avoid overwriting existing files by default. Use exclusive creation or request confirmation when a destination already exists.
  8. Apply the same validation independently to both the Markdown and HTML destinations.
  9. Add negative tests for values such as ../../target, ..\..\target, /tmp/target, encoded separators, control characters, and excessively long names.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (7)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description states that the skill helps '中文母语用户' and presents the skill as a Chinese-English bilingual expert, effectively constraining language/locale behavior to Chinese users. This is a natural-language locale restriction without any indication that users may choose another language or opt in to the constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill’s documented behavior goes beyond vocabulary instruction by mandating persistent file writes and opening generated HTML files on the user’s system. This creates unnecessary side effects, increases attack surface through rendered HTML/JavaScript content, and can surprise users with filesystem changes unrelated to the core educational task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill requires automatic file creation and browser/file opening without warning, consent, or confirmation. Silent side effects undermine user control and can be abused to persist content locally or present active HTML content in a context where the user expected only educational assistance.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Automatically opening generated HTML is not necessary for a vocabulary helper and is riskier than merely returning study content in chat. Rendering local HTML can execute embedded JavaScript, use browser APIs, and create a path for phishing-style UI, data persistence, or other unwanted local interactions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file is natural-language content, so policy checks apply. The template mandates Chinese headings, explanations, and checklist text throughout, which can amount to forcing a specific language without user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and all instructional content in this markdown file are written exclusively in Chinese, with no indication that the user can choose another language or that the file is intentionally limited to a Chinese-speaking audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

该文件的标题、说明和全部教学内容均以中文固定呈现,没有任何提示表明用户可选择其他语言。根据语言/地区政策,未经用户选择而强制单一语言属于自然语言层面的政策问题。

Content

No source excerpt is available for this finding.