Back to skill

Security audit

Huo15 Openclaw Mit 48h Learning Method

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent NotebookLM learning helper, but its script can be tricked into running local commands and writes saved study data with unsafe path handling.

Review before installing. Use it only with sources and answers you are comfortable sending to NotebookLM and saving locally. Avoid untrusted file:// arguments, avoid notebook titles containing path characters such as ../, and consider changing MIT_LEARN_KB_DIR and cleaning saved files under ~/.mit-learn-* and ~/knowledge/huo15/learning if you test it.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/mit-learn.sh:87
Finding

Arbitrary Command Execution Through Unsafe file:// URL Decoding

Content
View full analysis
/dev/null || echo "${path}") echo "$path" ``` ### Technical Analysis The value of `path` originates from a user-controlled `file://` argument and is interpolated directly into Python source code passed to `python3 -c`. Shell quoting does not make this safe at the Python-language level. An attacker can include a single quote, closing parentheses, Python statements, and a comment marker in the URL value. This terminates the intended string literal and introduces additional Python code. Conceptually, a malicious value shaped like the following can escape the intended expression: ```text file://x')); __import__('os').system(''); # ``` The resulting Python source executes the injected statement while `convert_file_url` is processing the argument. Execution occurs before the subsequent file-existence check, so the decoded path does not need to identify a valid local file. Both URL and file processing paths can reach this function when their values start with `file://`. ### Attack Path 1. An attacker persuades a user or automation system to invoke the Skill with a crafted `file://` source. 2. `cmd_add` identifies the value as a file URL and calls `convert_file_url`. 3. `convert_file_url` removes the `file://` prefix. 4. The remaining attacker-controlled string is inserted into the source supplied to `python3 -c`. 5. The injected Python statement invokes an operating-system command. 6. The command runs with the same operating-system identity and permissions as the user invoking the Skill. 7. The later `[ -f "${real_path}" ...[truncated 1163 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/mit-learn.sh:177
Finding

Knowledge-Base Path Traversal Through Unsanitized Notebook Titles

Content
View full analysis
"${NOTEBOOK_ID_FILE}" { echo "NOTEBOOK_ID=${notebook_id}" echo "TOPIC=${title}" echo "CREATED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)" } > "${ENV_FILE}" echo "${notebook_id}" ``` The stored topic is subsequently used directly as a directory component: ```bash run_query() { local notebook_id="$1" prompt="$2" save_name="${3:-}" local output_file="" if [ -n "${save_name}" ]; then local topic kb_topic_dir topic=$(get_topic) kb_topic_dir="${KB_DIR}/${topic}" mkdir -p "${kb_topic_dir}" output_file="${kb_topic_dir}/$(date +%Y-%m-%d)-${save_name}.md" fi ``` The export operation has the same unsafe path construction: ```bash cmd_export() { local notebook_id; notebook_id=$(get_notebook_id) || return 1 local topic; topic=$(get_topic) local kb_topic_dir="${KB_DIR}/${topic}" mkdir -p "${kb_topic_dir}" local index="${kb_topic_dir}/INDEX.md" info "导出学习成果到 ${kb_topic_dir}/" ``` ### Technical Analysis The notebook title supplied to `init`, `full`, or `marathon` is persisted as `TOPIC` in `~/.mit-learn-env`. `get_topic` later returns this value without validation: ```bash grep -E '^TOPIC=' "${ENV_FILE}" 2>/dev/null | tail -1 | cut -d= -f2- ``` The value is appended directly to `KB_DIR`. A title containing traversal components such as `../` causes the effective destination to escape the configured knowledge-base directory. Quoting protects the value from shell word splitting and shell command injection, but it does not prevent filesystem path traversal. `mkdir -p` resolves traversal components according to normal filesyste ...[truncated 2384 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documents network-capable behavior such as login, uploading materials, and interacting with NotebookLM, but it does not declare an explicit tool scope or permissions boundary. That creates an authorization and review gap: operators and users cannot easily tell what external actions the skill is allowed to perform, increasing the chance of unintended network access or silent data transfer.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are very broad and cover generic learning, study, media-generation, and AI-assistance scenarios, so the skill may activate for many ordinary requests where users did not intend to invoke it. In context, that matters because the skill can drive uploads, network interactions, and persistent storage, so accidental activation broadens data exposure and user surprise.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The workflow encourages users to repeatedly submit personal answers for diagnosis and then stores those interactions automatically, creating cumulative retention of free-form natural-language data. Even if intended for learning, iterative answers can reveal sensitive reasoning, internal project details, or confidential source material over time, making the persistence behavior more dangerous in this educational context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that prompts and responses are automatically saved and exported locally, but it does not clearly warn users that their inputs, answers, and generated content may persist on disk in a knowledge repository. This is dangerous because study inputs often contain sensitive documents, proprietary research, or personal notes, and users may not expect long-term local retention.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The export workflow collects all generated artifacts and writes them into a local knowledge repository, broadening exposure of user-supplied and model-generated content beyond the active session. This increases the blast radius if the local machine is shared, backed up to other services, indexed by desktop search, or later consumed by unrelated tools.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Automatically preserving user prompts and answers into a shared knowledge directory creates a direct data retention and leakage path. In this skill's context, users are encouraged to submit their own explanations, mistakes, and source materials repeatedly, so the stored corpus can accumulate sensitive personal, academic, or proprietary information that may later be accessed by other local processes or users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This config contains user-facing natural-language fields such as the description, auth note, phase names, and question descriptions entirely in Chinese. Under the stated policy, forcing a specific language without user opt-in or justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

LEARN_LANG is set to zh-CN by default, and that value is used for generated outputs such as audio and likely informs user-facing behavior. This constitutes a locale preference forced by default rather than selected by the user, and there is no interactive language choice or documented justification for a China-specific default.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script persists full NotebookLM prompts, responses, notebook IDs, topics, and timestamps into predictable locations under the user's home directory. Because study inputs may include proprietary, personal, or otherwise sensitive material, this creates an unintended local data-retention channel that can expose content to other local users, backups, sync tools, or later compromise of the host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The environment variable table sets MIT_LEARN_LANG to zh-CN as the default audio/video output language. The document does not clearly state that language is user-selectable at runtime or that the default is merely configurable, which can conflict with language/locale choice expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script stores notebook state and topic metadata in hidden files in the home directory without prominent disclosure in the help text or runtime prompts. While the data is less sensitive than full query contents, it still leaks usage history and identifiers that may reveal what the user is studying and enable correlation with remote NotebookLM resources.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.