Back to skill

Security audit

Bilingual Learning

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed local vocabulary-learning skill that stores and can modify its own word lists, with no hidden network, credential, or system-level behavior found.

Install this only if you want an agent skill that may mix bilingual learning prompts into responses and keep local vocabulary records. Back up the word-list files before using clear/delete operations, and do not enable the skill for tasks requiring exact output formats or single-language responses.

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

Note
Location
scripts/cli.py:82
Finding

Invalid Library Selector Can Clear the Wrong Vocabulary Library

Content
View full analysis
2 else "-n" lib = NewWordLibrary() if target == "-n" else KnownWordLibrary() lib.clear() print(f"{'生词库' if target == '-n' else '熟词库'} 已清空") ``` ### Technical Analysis The `clear` command does not verify that the library selector is one of the two documented values, `-n` or `-k`. It treats every value other than `-n` as a request to select `KnownWordLibrary`. Because `lib.clear()` immediately saves an empty list to the selected library file, a typographical error or attacker-influenced argument can erase the known-word library without warning. Similar binary selector handling appears in the `delete` and `list` commands, but the `clear` path has the greatest impact because it removes every entry from the selected library. This does not permit arbitrary file deletion: the affected path remains constrained to the Skill-managed `data/known_words.json` file through the fixed `KnownWordLibrary` class. ### Attack Path 1. A user, script, or attacker-influenced automation invokes the destructive command with an invalid selector, for example: ```bash python scripts/cli.py clear --known ``` 2. The value of `target` becomes `--known`. 3. Since `target == "-n"` is false, the conditional silently constructs `KnownWordLibrary`. 4. `lib.clear()` replaces the in-memory word list with an empty list and saves it. 5. The contents of `data/known_words.json` are consequently erased. No elevated privileges, shell injection, or external access are required. Exploitation requires the ability to invoke the local CLI or influence its arguments. ### Impact Assessment The vulnerability can cause unintended loss of locally stored known-word vocabulary data. The attacker gains no additional ...[truncated 310 chars]
Remediation
View remediation
2 else "-n" if target not in ("-n", "-k"): print("Error: target must be -n or -k") sys.exit(1) lib = NewWordLibrary() if target == "-n" else KnownWordLibrary() lib.clear() ``` 2. Apply the same selector validation to the `delete` and `list` commands so malformed arguments cannot silently target another library. 3. Require explicit confirmation before clearing a nonempty library, or require a deliberate `--force` flag for noninteractive use. 4. Create a backup before destructive updates, or implement a recoverable archive operation instead of immediate deletion. 5. Save changes atomically by writing validated JSON to a temporary file in the same directory and then replacing the destination file. This reduces the risk of corruption if the process is interrupted. 6. Add automated tests confirming that invalid, missing, and mistyped selectors do not modify either vocabulary library. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is advertised as always applying bilingual-learning logic before output, yet the content describes probabilistic exam triggering and dependence on external word libraries, which materially differs from the stated contract. This can lead to unauthorized persistence of inferred user knowledge and unreliable behavior under a misleading safety narrative, making the skill more dangerous in a conversational assistant context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is advertised as always applying bilingual-learning logic before output, yet the content describes probabilistic exam triggering and dependence on external word libraries, which materially differs from the stated contract. This can lead to unauthorized persistence of inferred user knowledge and unreliable behavior under a misleading safety narrative, making the skill more dangerous in a conversational assistant context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is advertised as always applying bilingual-learning logic before output, yet the content describes probabilistic exam triggering and dependence on external word libraries, which materially differs from the stated contract. This can lead to unauthorized persistence of inferred user knowledge and unreliable behavior under a misleading safety narrative, making the skill more dangerous in a conversational assistant context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill is advertised as always applying bilingual-learning logic before output, yet the content describes probabilistic exam triggering and dependence on external word libraries, which materially differs from the stated contract. This can lead to unauthorized persistence of inferred user knowledge and unreliable behavior under a misleading safety narrative, making the skill more dangerous in a conversational assistant context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill states that it forces bilingual-learning processing before final output, regardless of user choice. Overriding the user's requested language or output format is dangerous in an agent setting because it can violate policy constraints, break downstream workflows, and manipulate communications without consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Requiring mandatory bilingual processing before every final output removes user control over communication mode and can interfere with task correctness, accessibility, or policy compliance. In this skill context, the lack of language choice makes the behavior more dangerous because it is framed as automatic and universal rather than situational or consent-based.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file’s behavior materially differs from the declared skill purpose: instead of enforcing bilingual CN→EN learning/output processing, it provides a standalone local word-database management CLI. In an agent-skill ecosystem, this kind of capability drift is dangerous because it can hide undeclared data-manipulation functionality, expand the skill’s effective privileges, and undermine user/admin trust in the manifest-based review process.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill forces bilingual learning treatment before final output, including difficulty adjustment, exam detection, and bilingual output. However, the README's documented structure and usage are primarily a word-bank management tool and exam utilities, which is materially broader and different from a pure output-processing skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is described as forcibly modifying the agent's final output without user choice or opt-in. In an agent environment, mandatory output transformation can override user intent, interfere with higher-priority safety or formatting requirements, and create a pathway for unwanted behavior injection into otherwise unrelated tasks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documentation includes destructive state-changing operations such as delete, exchange, and clear that are not necessary for simple bilingual output. In an agent-skill context, exposing mutation and deletion features without clear authorization boundaries increases the risk of unintended or prompt-induced data loss in the word banks.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill describes capabilities that read and write persistent local data files, but it does not declare any tool scope or permissions boundary. This creates an authorization and transparency gap: an agent may be induced to access or modify local state without explicit review, and users are not clearly informed that persistent storage is involved.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill says it will detect words the user does not know and automatically write them into local word libraries, but it does not prominently warn users that inferred learning data will be persisted. This is a privacy and consent issue because the system is deriving and storing user profile information about knowledge gaps without explicit notice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring states this is a bilingual learning skill with a fixed direction of "CN -> EN". Under the policy, forcing a specific language/locale behavior without explicit user opt-in is a natural-language policy violation unless the constraint is clearly justified as region-specific, which is not shown here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says this skill forces bilingual-learning handling before final output, including difficulty adjustment, exam detection, and bilingual output. In contrast, this module implements config persistence plus CRUD-style management of word libraries on disk, including add/delete/clear/transfer operations, which is materially different from output-time bilingual processing.

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 strings for the tool description, usage instructions, errors, and status messages entirely in Chinese. Because the skill does not offer user opt-in or any language selection, it enforces a specific language/locale in a way that can violate language policy requirements.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill exposes direct add/delete/exchange/clear operations over local vocabulary stores without clear justification from the stated purpose of bilingual output transformation. Even though the code shown does not itself execute arbitrary commands, these undeclared state-changing operations can be abused to modify or erase local data and represent unnecessary attack surface relative to the advertised function.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The docstring explicitly says the system will '偶尔混杂语言,双语输出' (occasionally mix languages, bilingual output). This is a natural-language locale/language behavior that is imposed by the skill description rather than offered as an option, which can violate language-choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The changelog describes the skill as a bilingual learning skill specifically for "CN → EN", which suggests a fixed language/locale direction. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The architecture section says random dice is only invoked in hybrid mode for exam sequencing, suggesting tightly scoped use. Yet the documented project structure and usage expose dice.py as a standalone random generator/demo tool, which contradicts the claim of exclusive hybrid-only usage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language description and user-facing docstrings are entirely in Chinese, indicating a fixed language/locale choice. Under the stated policy, forcing a specific language without offering user choice or documenting a justified regional constraint is a policy violation.

Content

No source excerpt is available for this finding.