Back to skill

Security audit

zhz-english-learning

Security checks for vulnerabilities and agentic risk

Overview

This learning tool needs review because crafted quiz content can run unwanted browser code when generated pages are opened.

Have the quiz generators fixed to handle text safely before using untrusted lessons or sharing generated pages. Audio generation sends lesson text, vocabulary, and definitions to an online speech service, so avoid confidential material. All bundled source files were reviewed; external dependencies and live service behavior remain unverified. No evidence of intentional malicious behavior was found.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The workflow mandates Chinese translations without offering a language choice.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

Step 4 explicitly instructs the agent to generate a Chinese translation, and Step 5 requires displaying that translation. Although English source material is justified by the skill's learning purpose, the skill does not restrict its audience to Chinese-speaking learners or obtain their choice of translation language.

Content

No source excerpt is available for this finding.

Tainted flow: 'html' from pathlib.Path.read_text (line 168, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/generate_lesson_page.py (reported line 172)May include surrounding context.

python
output_path = Path(args.output)
    output_path.parent.mkdir(parents=True, exist_ok=True)
    output_path.write_text(html, encoding="utf-8")
    print(f"[OK] 课文学习页已保存:{output_path}({output_path.stat().st_size / 1024:.1f} KB)")

Tainted flow: 'html' from pathlib.Path.read_text (line 289, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
99% confidence
Finding

Question text and options from the JSON file are interpolated into strings assigned to innerHTML without escaping, allowing malicious markup and event handlers to execute when a learner opens the generated page. This is a stored/DOM XSS issue rather than a problem with file writing itself; deriving questions from user-provided lessons does not make their contents trusted.

Content

Scanner excerpt · scripts/generate_reading_quiz.py (reported line 293)May include surrounding context.

python
output_path = Path(args.output)
    output_path.parent.mkdir(parents=True, exist_ok=True)
    output_path.write_text(html, encoding="utf-8")
    print(f"[OK] 原文理解测验页已保存:{output_path}({output_path.stat().st_size / 1024:.1f} KB)")

Tainted flow: 'html' from pathlib.Path.read_text (line 462, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
99% confidence
Finding

Sentence, original, hint, option, and word-bank values reach innerHTML without escaping, so crafted learning content can execute browser JavaScript. Word-bank entries are additionally inserted inside inline onclick JavaScript string literals, allowing quotes in a value to inject code that runs when the learner clicks a word.

Content

Scanner excerpt · scripts/generate_sentence_quiz.py (reported line 466)May include surrounding context.

python
output_path = Path(args.output)
    output_path.parent.mkdir(parents=True, exist_ok=True)
    output_path.write_text(html, encoding="utf-8")
    print(f"[OK] 句子测验页已保存:{output_path}({output_path.stat().st_size / 1024:.1f} KB)")

Text is sent to an external speech service without disclosing the transmission.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

edge-tts transmits the supplied text to Microsoft's online speech service during synthesis. The docstrings, CLI help, and progress messages describe audio generation but do not disclose that text supplied directly, through a file, or through standard input leaves the local system.

Content

No source excerpt is available for this finding.

Word-list text is sent to an external speech service without disclosing the transmission.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The edge-tts call transmits the supplied text to Microsoft's online text-to-speech service. The docstring and progress messages describe audio generation but do not disclose that English words and Chinese definitions leave the user's system, which matters if the input contains private material.

Content

No source excerpt is available for this finding.