Back to skill

Security audit

Baidu Web Search - 百度网页搜索

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Baidu web-search helper that sends search queries to Baidu using a user-provided API key.

Install only if you are comfortable sending your search terms to Baidu Qianfan and storing a Baidu AppBuilder API key in BAIDU_API_KEY. Avoid using it for sensitive or private queries unless that data is appropriate to send to Baidu.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares access to an environment variable and makes outbound network requests, but the manifest does not define an explicit tool scope such as permissions or allowed-tools. That weakens policy enforcement and user/agent transparency, increasing the chance the skill is invoked with capabilities broader than expected. In this context, the skill sends user-provided search queries to a third-party API using a bearer token from the environment, so undeclared capability use is materially relevant.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger language is broad enough to match many ordinary conversational requests without clear boundaries, which can cause the agent to invoke the skill unexpectedly. Because this skill performs external web queries and transmits user prompts to Baidu, overbroad activation increases privacy and data-exposure risk and can displace safer or more appropriate tools.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The recommended-use section lists generic cues like 'search' and 'latest news' without guardrails, encouraging overly aggressive routing. In context, that means many routine user messages could be sent to an external search provider, exposing query content and increasing the chance of unnecessary network use or incorrect tool selection.

External Transmission

Medium
Category
Data Exfiltration
Content
}

    try:
        resp = requests.post(SEARCH_URL, headers=headers, json=body, timeout=20)
    except Exception as e:
        return {"error": "request_failed", "message": str(e)}
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
83% confidence
Finding
This code sends the user-provided search query to an external Baidu web search endpoint via HTTP, which is a data-transmitting network operation. While the module docstring identifies the API, there is no runtime user-facing warning, confirmation, or explicit disclosure near the call that the query content will be sent to a third-party service.

Missing User Warnings

Low
Confidence
71% confidence
Finding
The script reads BAIDU_API_KEY from the environment, which is a sensitive credential source. Although it validates presence, there is no accompanying comment, docstring, or user-facing disclosure about credential usage or sensitivity in this file.

Static analysis

No suspicious patterns detected.