Back to skill

Security audit

MyBooks

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this book-library skill suspicious because scanners report potentially destructive EPUB repair, local file access beyond declared permissions, and unclear disclosure of some actions and data flows.

Treat this as a review decision, not a claim that the author is malicious. Before installing, consider whether you accept the reported file-write and EPUB-overwrite risks, and whether the note and TTS behaviors match your expectations. Coverage was partial: Skillspector reports 75% coverage and a degraded analyzer, so the available evidence is incomplete.

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
scripts/mybooks_api.py
Finding

EPUB repair can overwrite originals without an enforced confirmation gate

Content
View full analysis

Impact

Original EPUB files can be replaced without a retained recovery copy. Scope is limited to selected books and the authenticated account's server permissions.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
Findings (14)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description declares importing third-party highlights and thoughts, but not clearing or deleting them. Its explicit deletion capability concerns reading-time records, not imported notes. The invoked operation therefore requests an undeclared destructive action. The API implementation is not supplied, so successful deletion cannot be verified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

这些调用仍属于书库应用领域,但批注检索与导入第三方批注是不同功能。特别是 own:0 示例明确包含其他用户共享的批注,超出了声明中个人书库管理及批注导入所描述的范围。代码未显示访问未共享的私密批注,也不能据此认定存在越权。

Content

No source excerpt is available for this finding.

Code capability 'file_write' detected in scripts/mybooks_api.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

Several report-generation tools accept output_file and open that caller-selected path with mode 'w', without directory restrictions or overwrite protection. An attacker who influences an agent's tool arguments could therefore truncate or replace files writable by the agent, despite these operations being described as read-only library research; the missing permission declaration further obscures this local filesystem effect.

Content

No source excerpt is available for this finding.

Code capability 'env' detected in scripts/mybooks_api.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in scripts/mybooks_api.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/mybooks_api.py (reported line 60)May include surrounding context.

python
API_EPUB_FIXER_PREFIX = "/api/toolbox/epub_fixer"

# book_upload only reads files with these extensions (blocks sending arbitrary
# local files such as ~/.ssh/id_rsa or .env to the server)
EBOOK_UPLOAD_EXTS = {"epub", "mobi", "azw", "azw3", "pdf", "txt", "lrf", "rtf", "djvu", "docx"}

# Douban is applied by re-fetching from the plugin by provider_value; every other source

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/mybooks_api.py (reported line 60)May include surrounding context.

python
API_EPUB_FIXER_PREFIX = "/api/toolbox/epub_fixer"

# book_upload only reads files with these extensions (blocks sending arbitrary
# local files such as ~/.ssh/id_rsa or .env to the server)
EBOOK_UPLOAD_EXTS = {"epub", "mobi", "azw", "azw3", "pdf", "txt", "lrf", "rtf", "djvu", "docx"}

# Douban is applied by re-fetching from the plugin by provider_value; every other source

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · scripts/mybooks_api.py (reported line 1563)May include surrounding context.

python
if not save_to.lower().endswith(".wav"):
                    return {"status": "error", "message": "save_to must end with .wav"}
                if os.path.exists(save_to):
                    return {"status": "error", "message": f"Refusing to overwrite existing file: {save_to}"}
                with open(save_to, 'wb') as f:
                    f.write(content)
                return {

Library maintenance tools expose local JSON file access outside the declared filesystem permissions.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The declared filesystem scope permits only ebook/audio upload reads and non-overwriting WAV output, but the maintenance tools also document input_file, plan_file, and output_file access to local JSON files. This makes the permission declaration incomplete and can lead to unexpected local data access or writes; whether arbitrary paths or overwrites are actually possible cannot be established without the implementation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1828)May include surrounding context.

md
| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `api_url` | string | ✅ | API 地址,如 `https://api.xiaomimimo.com/v1/chat/completions` |
| `model_name` | string | ✅ | 模型 ID,MiMo TTS 类型固定为 `mimo-v2.5-tts` |
| `api_type` | string | ✅ | API 类型:`chat_completions`(MiMo TTS)/ `audio_speech`(OpenAI 兼容)/ `custom` |
| `api_key` | string | ✅ | API 密钥 |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1839)May include surrounding context.

执行脚本:

bash
<skill-installation-path>/scripts/mybooks_api.py tts_save_config '{"api_url":"https://api.xiaomimimo.com/v1/chat/completions","model_name":"mimo-v2.5-tts","api_type":"chat_completions","api_key":"sk-xxx","voice_name":"mimo_default"}'

响应示例:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1904)May include surrounding context.

执行脚本:

bash
<skill-installation-path>/scripts/mybooks_api.py tts_convert '{"book_id":42,"api_url":"https://api.xiaomimimo.com/v1/chat/completions","model_name":"mimo-v2.5-tts","api_type":"chat_completions","api_key":"sk-xxx","voice_name":"mimo_default"}'

响应示例:

The TTS workflow omits disclosure that ebook text is sent to an external speech-generation provider.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The TTS workflow specifies an external API but does not explicitly disclose that ebook text is transmitted to the configured speech provider through the MyBooks server. Although the client may contact only MYBOOKS_HOST, the broad no-third-party-transmission assurances omit this downstream data flow, which could expose private or confidential book content without informed consent.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/mybooks_api.py (reported line 2341)May include surrounding context.

python
if tool_name in AUTH_FREE_TOOLS:
            return AUTH_FREE_TOOLS[tool_name](args)

        tool_method = getattr(self, tool_name, None)

        if tool_method is None or not callable(tool_method):
            available_tools = [