Back to skill

Security audit

Perplexity Deep Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Perplexity search wrapper that sends user queries to the Perplexity API and does not show hidden, destructive, or unrelated behavior.

Install this only if you are comfortable sending your search prompts, filters, and API token to Perplexity. Prefer setting PERPLEXITY_API_KEY through your environment or secret manager instead of storing it in ~/.config/perplexity/api_key, and reserve the higher-cost research mode for queries where that cost is acceptable.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and demonstrates shell-based execution via scripts/search.sh and shell setup commands, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization and review gap: consumers cannot easily determine what execution capabilities the skill expects, increasing the risk of unintended command execution or over-broad runtime access in agents that enforce least privilege.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The skill recommends persisting a sensitive API key in a long-lived plaintext file under ~/.config/perplexity/api_key. Although chmod 600 limits exposure to the local user, persistent storage increases the chance of credential theft from local compromise, backups, dotfile sync, or accidental inclusion in support bundles and screenshots.

Content

Scanner excerpt · SKILL.md (reported line 63)May include surrounding context.

Set PERPLEXITY_API_KEY env var, or store it in a file:

bash
mkdir -p ~/.config/perplexity
echo "your_key_here" > ~/.config/perplexity/api_key
chmod 600 ~/.config/perplexity/api_key

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

bash
mkdir -p ~/.config/perplexity
echo "your_key_here" > ~/.config/perplexity/api_key
chmod 600 ~/.config/perplexity/api_key

The script checks the env var first, then falls back to the file.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/search.sh (reported line 96)May include surrounding context.

sh
fi

# Make API call
RESPONSE=$(curl -sS "https://api.perplexity.ai/chat/completions" \
  -H "Authorization: Bearer $PERPLEXITY_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD" 2>&1)

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 · scripts/search.sh (reported line 96)May include surrounding context.

sh
fi

# Make API call
RESPONSE=$(curl -sS "https://api.perplexity.ai/chat/completions" \
  -H "Authorization: Bearer $PERPLEXITY_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD" 2>&1)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This shell script sends the provided query, and potentially domain-filter context, to an external API via curl. While the script's search purpose implies network use, the file itself does not include any explicit disclosure in comments, usage text, or output that user-supplied content is transmitted to a third-party service.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.