Back to skill

Security audit

Bocha Web Search A2M

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed paid web-search skill, but its broad paid-search trigger and unsafe shell-style API example deserve review before use.

Install only if you want Bocha's paid A2M web search. Confirm cost and payment prompts before use, avoid putting secrets or private data in search queries, and prefer an agent/runtime that sends the request through a safe HTTP/JSON API rather than direct shell-string substitution.

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
SKILL.md:63
Finding

Shell Command Injection Through Unsafe Search Query Interpolation

Content
View full analysis
", "freshness": "", "summary": true, "count": }' ``` The placeholders above correspond to the user search query, time range, and result count placeholders in the original Skill instructions. ### Technical Analysis The Skill instructs an Agent to extract a search query from user input and insert it into JSON embedded in a single-quoted shell argument. It does not require the Agent to use a JSON serializer, safe process argument API, or shell escaping. If an implementation performs direct textual substitution, a single quote in the search query can terminate the `curl -d` argument. Subsequent shell metacharacters can then introduce additional commands. JSON escaping alone is insufficient because shell parsing occurs before `curl` processes the JSON. The `freshness` and `count` placeholders are also interpolated into shell source. Although the document describes constrained values for them, implementations should validate these parameters rather than relying solely on the natural-language constraints. ### Attack Path 1. An attacker asks the Agent to search for a phrase containing a single quote followed by shell syntax, such as a value structurally equivalent to: ```text x'; attacker_command; # ``` 2. The Agent extracts the supplied phrase as the search query. 3. The Agent substitutes the query directly into the documented shell command. 4. The single quote terminates the intended `curl` data argument. 5. The shell interprets the remaining metacharacters and attacker-supplied command as executable syntax. 6. The injected com ...[truncated 983 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are broad enough to match routine web-search requests, which can cause the skill to be invoked in situations where a general search or non-paid tool would be more appropriate. In this context, overbroad invocation is risky because it can steer users into an external paid workflow and unnecessary data transmission without clear minimization or strict scoping.

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 30)May include surrounding context.

md
## 资源接口信息

**接口地址**: `https://api.bocha.cn/v1/marketplace/alipay/bochawebsearch`

**请求方法**: POST

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 63)May include surrounding context.

md
## 资源接口信息

**接口地址**: `https://api.bocha.cn/v1/marketplace/alipay/bochawebsearch`

**请求方法**: POST

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 63)May include surrounding context.

向博查 API 发起 POST 请求:

bash
curl -X POST "https://api.bocha.cn/v1/marketplace/alipay/bochawebsearch" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "<用户搜索词>",