Back to skill

Security audit

Daum Toy Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Daum/Kakao search helper that sends user queries to a disclosed external API and prints results, with privacy and prompt-injection cautions users should understand.

Install only if you are comfortable sending search queries and the DAUM_TOY_SEARCH_API_KEY to the hosted Upstage/Daum adapter. Avoid using sensitive prompts, secrets, personal data, or regulated information as search queries, and treat returned Markdown as untrusted search content rather than commands for the agent to follow.

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/search.mjs:66
Finding
Untrusted Search Results Rendered for Direct AI Agent Ingestion<![CDATA[ ## Vulnerability Details **File Location**: `scripts/search.mjs`, lines 66-70 **Vulnerability Type**: Untrusted remote content injection into agent-facing Markdown **Risk Level**: Medium ### Vulnerable Code ```js data.results.forEach((res, index) => { console.log(`### ${index + 1}. [${res.title}](${res.url})`); console.log(`**Source:** ${res.source} | **Date:** ${res.date}`); console.log(`${res.snippet}\n`); }); ``` ### Technical Analysis The `title`, `url`, `source`, `date`, and `snippet` fields originate from an external search API and are inserted directly into Markdown without sanitization, escaping, URL validation, or trust-boundary markers. The skill documentation states that this output is suitable for direct ingestion by AI agents. Consequently, attacker-controlled search content can enter an agent's context as natural-language instructions or crafted Markdown. An attacker may publish content designed to rank for a targeted query, or a compromised upstream API may return malicious fields. Possible payloads include: - Instruction-like text intended to override the consuming agent's current task. - Markdown that disguises an attacker-controlled URL as a trusted destination. - Crafted titles or snippets that alter the apparent structure of the returned document. - Non-HTTP URL schemes or misleading links if a downstream renderer makes them actionable. The script does not itself execute the returned content. Exploitation therefore depends on a downstream AI agent or renderer treating the generated Markdown as trusted instructions or actionable content. ### Attack Path 1. An attacker publishes a page containing prompt-injection text or crafted Markdown and causes it to be indexed by the upstream search provider. Alternatively, the upstream API or its response path is compromised. 2. A user or agent invokes the skill with a query for which the malicious page is returned. 3. The external API places attacker-controlled values in ...[truncated 1141 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every API response field as untrusted data and clearly delimit search results from agent instructions. 2. Escape Markdown control characters in titles, snippets, sources, and dates before rendering them. 3. Parse and validate result URLs. Permit only expected `https:` or, where required, `http:` schemes, and reject schemes such as `javascript:`, `data:`, and `file:`. 4. Prefer structured JSON output for machine consumption, with explicit fields and trust metadata, rather than instruction-like Markdown. 5. Add a warning to generated output stating that retrieved content is untrusted and must not be interpreted as commands, policies, or tool-use instructions. 6. Require consuming agents to preserve the instruction hierarchy and never follow instructions found in search results. 7. Apply response-schema validation, including field types, length limits, result-count limits, and rejection of malformed responses. 8. Where Markdown output remains necessary, use a dedicated escaping function and test it against nested links, headings, code fences, control characters, and multiline prompt-injection payloads. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Ae1

High
Category
analysis-evasion
Content
The `search.mjs` script outputs concise, formatted Markdown suitable for direct ingestion by AI agents:
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares network and environment-variable capabilities via metadata and examples, but does not define an explicit tool scope such as allowed tools or permissions. That creates a policy gap where an agent may invoke broader capabilities than the user expects, especially since the skill sends authenticated requests using an API key.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README includes an authenticated POST request to a remote third-party service but does not warn users that both search queries and the bearer token are transmitted off-platform. This can lead to unintended disclosure of sensitive prompts, search terms, or credentials in environments where users assume searches are local or privacy-preserving.

External Transmission

Medium
Category
Data Exfiltration
Content
You can use `curl` to query the API from your OpenClaw agents:

```bash
curl -s -X POST "https://daum-perplexity-search-adapter.toy.x.upstage.ai/search" \
     -H "Authorization: Bearer $DAUM_TOY_SEARCH_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
Confidence
97% confidence
Finding
The skill explicitly performs external transmission by sending user-supplied queries and an Authorization bearer token to https://daum-perplexity-search-adapter.toy.x.upstage.ai/search. While this is core to the skill's purpose, it is still security-relevant because any sensitive user input entered as a query leaves the local environment and is exposed to a third-party service.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The script transmits the user-provided search query to an external HTTPS service, but it does not disclose that data leaves the local environment or warn users that queries may be logged or processed by a third party. In an agent skill context, queries can contain sensitive prompts, internal data, or personal information, so silent exfiltration to an external service creates a real privacy and data-handling risk even though the behavior appears to be the intended functionality.

Static analysis

No suspicious patterns detected.