Back to skill

Security audit

读书每日推荐

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated purpose, but its generated HTML and PNG rendering path handle untrusted card data too loosely, creating a real review-worthy browser injection and outbound request risk.

Install only if you are comfortable with a skill that contacts WeRead, writes local card/cache files, and opens generated HTML for preview or PNG rendering. Use card JSON only from trusted sources, avoid arbitrary cover_url/book_url values, and prefer running it in a restricted workspace until the template escaping, URL validation, and dependency documentation are fixed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/reader.py:244
Finding

Unescaped Template Substitution Enables Persistent HTML and JavaScript Injection

Content
View full analysis
每日读书推荐 - {{book_title}}
{{title}}
《{{book_title}}》
{{book_desc}}
—— {{book_author}}
《{{book_title}}》
{{book_author}}
推荐值 {{rating}} | {{reading_count}}人今日阅读
去阅读 ``` ### Technical Analysis The renderer reads values from a caller-selected JSON file and performs raw string replacement. It does not apply HTML entity encoding, attribute encoding, CSS-string encoding, or URL validation. The same replacement mechanism is used in several distinct parsing contexts: - HTML text nodes, such as `book_desc` and `book_title` - HTML attributes, such as `book_url` - Inline CSS, such as `cover_url` - The document title Because each context has different escaping requirements, raw replacement allows a value to terminate its intended conte ...[truncated 1810 chars]
Remediation
View remediation
` element instead. 4. Add a restrictive Content Security Policy, for example one that disallows inline scripts, plugins, and unexpected network destinations. 5. Treat fetched book metadata and all LLM-generated or caller-provided JSON fields as untrusted. 6. Add regression tests containing HTML tags, quotes, event handlers, CSS delimiters, and dangerous URL schemes. Verify that they are encoded as text rather than interpreted as markup. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/reader.py:270
Finding

Headless PNG Rendering Allows Attacker-Controlled Outbound Requests

Content
View full analysis
``` ### Technical Analysis The `cover_url` field comes from the card JSON and is inserted into a CSS `url()` expression without scheme, host, or destination validation. When `--png` is selected, Playwright opens the generated page in Chromium. Chromium then resolves and requests the specified resource from the rendering host's network environment. This produces a blind SSRF-like primitive. The attacker cannot directly obtain the response body through the normal screenshot output, but can cause requests to external or internal destinations. Observable callbacks, response timing, and differences in rendering behavior may reveal whether a destination is reachable. The raw HTML injection issue described separately can introduce additional resource-loading elements, but exploitation of this finding requires only control of `cover_url`. ### Attack Path 1. An attacker supplies a card JSON file containing a selected destination: ```json { "cover_url": "http://127.0.0.1:8080/internal-status" } ``` 2. The vic ...[truncated 1007 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:191
Finding

Unpinned and Incorrect Dependency Installation Guidance

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to perform network access and local file reads/writes, but it does not declare any explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can cause the skill to run with broader capabilities than users expect, increasing the risk of unintended file creation, overwriting local data, or unreviewed network access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include broad everyday terms like '读书推荐', '推荐一本书', and 'book recommendation', which can match many benign user requests unrelated to this skill. That raises the chance of accidental activation of a skill that performs network fetching and file generation, causing unintended side effects and surprising behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description explains how to fetch remote content and create local JSON/HTML/PNG artifacts, but it does not clearly warn users up front that invoking the skill may contact external sites and write files to disk. This reduces informed consent and makes the broad triggers more dangerous because users may not realize the skill has side effects beyond providing a text recommendation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description is presented entirely in Chinese and does not state that the skill is China-specific or that users may choose another language. This can amount to a language/locale policy issue when a skill appears to force a specific language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML document declares lang="zh-CN", and the visible UI text throughout the template is fixed in Chinese. This imposes a specific language/locale on all users without any opt-in, alternative locale handling, or documented region-specific justification, which matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This manifest description says the skill fetches ranking data and generates recommendation cards, but it does not indicate when the skill should be invoked or any limiting trigger context. In a manifest file, lack of specificity about trigger scope can contribute to unintended activation if used for routing or discovery.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring and usage flow specify the skill entirely in Chinese, including generated content such as titles, recommendations, and labels, without indicating that the user can choose another language. This is a natural-language locale constraint visible in the file and may conflict with policies requiring language choice or explicit opt-in.

Content

No source excerpt is available for this finding.