Back to skill

Security audit

Tavily Web Seeker

Security checks for vulnerabilities and agentic risk

Overview

This web-search skill is mostly purpose-aligned, but it has under-disclosed credential and data-handling risks that should be reviewed before installation.

Review this skill before installing in sensitive environments. Use it only with Tavily keys you are comfortable exposing to this integration, avoid setting TAVILY_BASE_URL unless it is strictly controlled and trusted, and do not enable report export for sensitive queries unless local persistence under your OpenClaw workspace is acceptable.

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

Error
Location
scripts/seeker.js:4
Finding

Unrestricted API Base URL Exposes Tavily Credentials and Search Queries

Content
View full analysis

Vulnerability Details

File Location: scripts/seeker.js, lines 4 and 81–85
Vulnerability Type: Unvalidated credential-bearing endpoint configuration
Risk Level: High

Vulnerable Code

js
const BASE_URL = process.env.TAVILY_BASE_URL || "https://api.tavily.com";
js
const resp = await fetch(`${BASE_URL}/search`, {
  method: "POST",
  headers: { "Content-Type": "application/json", "Authorization": `Bearer ${apiKey}`, "X-Client-Source": "tavily-web-seeker" },
  body: JSON.stringify(body),
  signal: AbortSignal.timeout(30000)
});

Technical Analysis

The TAVILY_BASE_URL environment variable is used as the destination for API requests without validating its protocol, hostname, port, or origin. The resulting request includes a Tavily API key in the Authorization header and the user's search query in the request body.

Consequently, any party able to influence the process environment can redirect credential-bearing requests to an arbitrary endpoint. An http:// endpoint would also permit network interception because TLS is not required. This issue does not independently grant an external attacker control over the environment; exploitation requires prior influence over deployment configuration, process launch parameters, or another mechanism capable of setting the variable.

Attack Path

  1. An attacker obtains the ability to modify the Skill's environment or deployment configuration.
  2. The attacker sets TAVILY_BASE_URL to an HTTP or HTTPS server under their control.
  3. A user invokes webSeeker, causing searchWithRetry to construct a request to the malicious base URL.
  4. The request transmits the Tavily bearer token in the Authorization header.
  5. The request body also discloses the user's query, domain filters, result limits, search depth, and applicable time range.
  6. The attacker records the token and search data and may reuse the token against Tavily until it is revoked, expires, or reaches its usage limit.

...[truncated 738 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove support for overriding the production endpoint if a custom Tavily endpoint is not operationally necessary.
  2. If endpoint customization is required, parse it with URL and enforce all of the following before making a request:
    • The protocol must be https:.
    • The hostname must match an explicit allowlist, preferably only api.tavily.com.
    • User information in the URL must be prohibited.
    • Unexpected ports, fragments, and path prefixes must be rejected.
  3. Compare the validated destination origin against the trusted Tavily origin before adding the Authorization header. Never send credentials across redirects or to a different origin.
  4. Configure the HTTP client to reject cross-origin redirects, or disable redirects and handle only explicitly approved same-origin redirects.
  5. Store endpoint configuration in trusted, access-controlled deployment settings rather than accepting an unrestricted process environment value.
  6. Rotate all API keys if there is evidence that the base URL was previously redirected or that requests were sent over plaintext HTTP.
  7. Add automated tests verifying that HTTP URLs, lookalike domains, embedded credentials, alternate ports, and unapproved hosts are rejected before any request containing an API key is sent.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The documentation claims critical source validation and offline report generation, but the observed behavior apparently does not fully enforce critical_sources and also performs local filesystem writes that are not clearly declared in the skill contract. This mismatch is dangerous because users and platform reviewers may trust guarantees the skill does not actually provide, while the undeclared file output expands its effective capability surface.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill advertises networked search behavior and references environment-based API keys, but it does not declare an explicit tool scope such as allowed-tools or permissions. Missing scope boundaries can cause an agent platform to grant broader-than-necessary access or make review of runtime capabilities ambiguous, which violates least-privilege expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example not-found response is written in Chinese, and the skill does not state that it is limited to Chinese users or that language selection is configurable. This can violate language/locale policy expectations by implicitly forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill transmits user queries to an external Tavily API, but there is no built-in disclosure at the point of use that user input leaves the local environment. In agent settings, this can expose sensitive prompts, proprietary terms, or investigation topics to third-party infrastructure without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill writes a markdown report to a fixed local path under the user's home directory, which expands behavior beyond pure search into persistent filesystem side effects. This can unexpectedly retain sensitive queries and result content on disk, creating privacy and data-handling risks, especially in agent environments where users may not expect local file creation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill writes query-derived report content to disk without an explicit user-facing warning or consent flow. Because the report includes the original query and search results, it may persist sensitive prompts, research topics, or internal investigation details in a predictable workspace location.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

For a web search skill, using one configured API key is expected, but scanning TAVILY_API_KEY plus TAVILY_API_KEY_2 through _10 introduces broader credential-harvesting behavior from the environment. That capability is not justified by the manifest's stated search, intent recognition, source preference, validation, and report-generation purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill includes built-in Chinese-language trigger handling and emits Chinese-language not-found and suggestion text, which can force a locale/language choice in outputs regardless of user preference. There is no mechanism to let the user select language or documentation justifying a Chinese-only/regional constraint.

Content

No source excerpt is available for this finding.