Back to skill

Security audit

Tavily Search

Security checks for vulnerabilities and agentic risk

Overview

This Tavily skill mostly matches its stated search, crawl, extract, and research purpose, but it automatically reads a shared local MCP token cache and may run an unpinned npm OAuth helper, which warrants user review before installation.

Review this skill before installing. Prefer setting TAVILY_API_KEY explicitly in a scoped environment instead of letting the scripts read ~/.mcp-auth, and avoid running the OAuth fallback unless you accept unpinned npx package execution. Do not use it with confidential URLs or regulated content unless sending that data to Tavily is approved.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
crawl/scripts/crawl.sh:8
Finding

Recursive Enumeration of Shared MCP Credential Cache with Unverified JWT Claims

Content
View full analysis
/dev/null } # Function to check if a JWT is valid for Tavily (not expired and correct issuer) is_valid_tavily_token() { local token="$1" local payload=$(decode_jwt_payload "$token") # Check if it's a Tavily token (exact issuer match for security) local iss=$(echo "$payload" | jq -r '.iss // empty' 2>/dev/null) if [ "$iss" != "https://mcp.tavily.com/" ]; then return 1 # Not a valid Tavily token fi # Check if expired local exp=$(echo "$payload" | jq -r '.exp // empty' 2>/dev/null) if [ -n "$exp" ] && [ "$exp" != "null" ]; then local current_time=$(date +%s) if [ "$current_time" -ge "$exp" ]; then return 1 # Expired fi fi return 0 # Valid Tavily token } # Function to find token from MCP auth cache get_mcp_token() { MCP_AUTH_DIR="$HOME/.mcp-auth" if [ -d "$MCP_AUTH_DIR" ]; then # Search recursively for *_tokens.json files while IFS= read -r token_file; do if [ -f "$token_file" ]; then token=$(jq -r '.access_token // empty' "$token_file" 2>/dev/null) if [ -n "$token" ] && [ "$token" != "null" ]; then # Check if valid Tavily token (correct issuer and not ...[truncated 3519 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Warning
Location
crawl/scripts/crawl.sh:102
Finding

Automatic Retrieval and Execution of an Unpinned npm Package During OAuth

Content
View full analysis
&2 echo "Please complete authentication in your browser..." >&2 npx -y mcp-remote https://mcp.tavily.com/mcp /dev/null 2>&1 & MCP_PID=$! TIMEOUT=120 ELAPSED=0 while [ $ELAPSED -lt $TIMEOUT ]; do sleep 3 ELAPSED=$((ELAPSED + 3)) token=$(get_mcp_token) || true if [ -n "$token" ]; then export TAVILY_API_KEY="$token" echo "Authentication successful!" >&2 break fi done kill $MCP_PID 2>/dev/null || true wait $MCP_PID 2>/dev/null || true set -e fi ``` The repository also recommends mutable installation commands, including: ```bash npx skills add https://github.com/tavily-ai/skills pip install tavily-python npm install @tavily/core ``` Additional unpinned dependency commands appear in `tavily-best-practices/references/integrations.md`. ### Technical Analysis The command: ```bash npx -y mcp-remote https://mcp.tavily.com/mcp ``` allows npm to resolve, download, and immediately execute the current registry version of `mcp-remote`. No exact version, lockfile, package integrity hash, or reviewed local installation is specified. The effective executable can therefore change after this repository has been reviewed. The `-y` option suppresses the normal installation confirmation, and execution occurs automatically whenever no Tavily credential is found. npm packages can ...[truncated 2159 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (65)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared Tavily search functionality does not match the reported behaviors of content extraction, local token discovery in ~/.mcp-auth, and OAuth flow initiation through npx mcp-remote. Hidden or under-disclosed credential access in a seemingly harmless search skill is particularly risky because it can collect authentication material or trigger remote connectivity beyond user intent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared Tavily search functionality does not match the reported behaviors of content extraction, local token discovery in ~/.mcp-auth, and OAuth flow initiation through npx mcp-remote. Hidden or under-disclosed credential access in a seemingly harmless search skill is particularly risky because it can collect authentication material or trigger remote connectivity beyond user intent.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

The skill instructs users to place a third-party API key in ~/.claude/settings.json, an agent configuration location that may be broadly accessible to other skills, tools, or sessions. Storing secrets in a shared agent config increases the blast radius of credential exposure and can enable unintended reuse or leakage.

Content

Scanner excerpt · crawl/SKILL.md (reported line 20)May include surrounding context.

Alternative: API Key

If you prefer using an API key, get one at https://tavily.com and add to ~/.claude/settings.json:

json
{
  "env": {

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

The documentation instructs users to place a third-party API key into the agent's global config file ~/.claude/settings.json, which is a sensitive configuration location potentially shared across skills. While not direct exfiltration, this guidance increases the blast radius of credential exposure if other skills, logs, or tooling can read that config.

Content

Scanner excerpt · extract/SKILL.md (reported line 20)May include surrounding context.

Alternative: API Key

If you prefer using an API key, get one at https://tavily.com and add to ~/.claude/settings.json:

json
{
  "env": {

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · README.md (reported line 21)May include surrounding context.

Alternative: API Key

If you prefer using an API key, get one at https://tavily.com and add to ~/.claude/settings.json:

json
{
  "env": {

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · research/SKILL.md (reported line 19)May include surrounding context.

Alternative: API Key

If you prefer using an API key, get one at https://tavily.com and add to ~/.claude/settings.json:

json
{
  "env": {

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · search/SKILL.md (reported line 20)May include surrounding context.

Alternative: API Key

If you prefer using an API key, get one at https://tavily.com and add to ~/.claude/settings.json:

json
{
  "env": {

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · tavily-best-practices/references/integrations.md (reported line 210)May include surrounding context.

md
from pydantic_ai.agent import Agent
from pydantic_ai.common_tools.tavily import tavily_search_tool

# Get API key from environment
api_key = os.getenv("TAVILY_API_KEY")
assert api_key is not None

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises executable shell usage via required binaries and example script invocation, but does not declare an explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where a host may allow broader execution than users expect, increasing the chance of unintended command execution or expansion of capability over time.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include very broad terms like '搜索', 'search', and '新闻', which are likely to match ordinary conversation and cause unintended activation. In a skill with shell-backed behavior and reported access to crawling/auth-related functionality, accidental invocation increases the chance of surprising network actions or exposure of sensitive local state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises crawling and local saving functionality but does not clearly warn users that fetched content is transmitted to Tavily and may also be written to local files. This can cause users to submit sensitive internal URLs or content to a third party without informed consent, creating privacy and data handling risk.

Content

No source excerpt is available for this finding.

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 · crawl/SKILL.md (reported line 60)May include surrounding context.

Basic Crawl

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \

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 · crawl/SKILL.md (reported line 157)May include surrounding context.

Basic Crawl

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \

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 · crawl/SKILL.md (reported line 61)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

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 · crawl/SKILL.md (reported line 75)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

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 · crawl/SKILL.md (reported line 92)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

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 · crawl/SKILL.md (reported line 158)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

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 · crawl/SKILL.md (reported line 175)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

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 · crawl/SKILL.md (reported line 193)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

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 · crawl/SKILL.md (reported line 213)May include surrounding context.

bash
curl --request POST \
  --url https://api.tavily.com/crawl \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This search/crawl skill performs local credential discovery in ~/.mcp-auth and, if none are found, starts an interactive OAuth helper process. That behavior exceeds a simple crawler's expected scope and can surprise users by accessing local auth material and initiating external authentication flows, increasing privacy and trust-boundary risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script searches the user's MCP auth cache and reuses cached access tokens without explicit consent at runtime. Even though it filters for Tavily issuer and expiry, silently harvesting and using local tokens violates least surprise and can expose credentials to unintended use if this skill is invoked in broader automated contexts.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The script launches npx -y mcp-remote without pinning an exact package version or integrity, so execution depends on whatever package version is served at runtime. That creates a supply-chain risk: a compromised or malicious upstream package update could execute arbitrary code locally during the OAuth helper flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The script sends the constructed JSON-RPC request, including the target URL and crawl arguments, to https://mcp.tavily.com/mcp. Although the script identifies itself as a Tavily API tool, the help output does not explicitly disclose that provided input and discovered crawl content are sent to an external service.

Content

No source excerpt is available for this finding.