Back to skill

Security audit

Serper Web Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple Serper search helper; it has privacy and API-key handling cautions, but its behavior matches its stated purpose.

Install only if you are comfortable sending search queries to Serper/Google and managing a Serper API key. Prefer the environment-variable form, avoid pasting real keys inline in shell commands, and avoid searching for secrets, personal data, or confidential business terms without deliberate confirmation.

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

Note
Location
SKILL.md:31
Finding
Unsafe Inline API Key Handling in Command Example## Vulnerability Details **File Location**: `SKILL.md`, lines 31–36 **Vulnerability Type**: API credential exposure through command-line arguments **Risk Level**: Low ### Vulnerable Code ```bash curl -s -X POST "https://google.serper.dev/search" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"q": "your query"}' ``` ### Technical Analysis The documentation instructs users to replace `YOUR_API_KEY` with a real Serper API key directly in a shell command. This can expose the credential through shell history and, depending on the operating system and process-isolation configuration, process inspection while `curl` is running. The example contains only a placeholder and therefore does not itself disclose a valid credential. The vulnerability arises when a user follows the documented procedure with a real secret. ### Attack Path 1. A user substitutes a valid Serper API key for `YOUR_API_KEY`. 2. The user runs the resulting command in an interactive shell. 3. The command containing the key may be saved in the user's shell-history file or exposed through local process-inspection mechanisms. 4. An attacker with sufficient local access reads the command or history entry and extracts the key. 5. The attacker submits unauthorized requests to the Serper API using the stolen credential. Exploitation requires local access to relevant process information, shell history, terminal logs, or another command-recording facility. ### Impact Assessment A recovered key could permit unauthorized use of the victim's Serper account and API quota within the permissions assigned to that key. This may cause quota exhaustion, unexpected charges, or unauthorized search activity attributed to the victim. The documented behavior does not grant operating-system privileges, persistence, or arbitrary code execution. The impact is limited to the compromised API credential and its associated service permission ...[truncated 2 chars]
Remediation
## Remediation Suggestions - Remove the inline-key example and document only a protected environment-variable or secret-manager workflow. - Advise users not to paste credentials directly into interactive shell commands. - Prefer a protected configuration file with restrictive permissions or a secret-injection mechanism that does not expose the key in command history. - Ensure diagnostic output and command tracing do not print the `X-API-Key` header. - Recommend rotating the credential immediately if it has been entered into shell history, logs, or other persistent command-recording systems. - If an environment variable is used, avoid enabling shell tracing such as `set -x` while executing the request.
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 (3)

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger conditions are broad enough that the skill may activate for generic requests to 'search the web' whenever a Serper API key is present. That can route user queries to an external provider without clear user intent for this specific integration, increasing the risk of unintended third-party data disclosure.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill describes how to use the API but does not warn that search terms are transmitted to Serper, a third-party service. Users may provide sensitive queries under the assumption the action is local, leading to unintentional external disclosure of private or regulated information.

External Transmission

Medium
Category
Data Exfiltration
Content
### With API Environment Key in

```bash
SERPER_API_KEY="your-key" curl -s -X POST "https://google.serper.dev/search" \
  -H "X-API-Key: $SERPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "your query"}'
Confidence
90% confidence
Finding
The documented command performs a POST request to an external endpoint and includes the user's query in the request body, which is a direct external data transmission. In this skill context that behavior is expected, but it still creates a real privacy and data-handling risk if sensitive prompts, identifiers, or confidential research terms are sent without adequate disclosure or consent.

Static analysis

No suspicious patterns detected.