perplexity-4

Warn

Audited by Gen Agent Trust Hub on Jun 22, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/perplexity_search.sh performs unsafe dynamic code generation by interpolating shell variables into a Python command.
  • Evidence: The script assembles a Python payload using BODY=$(python3 -c "... 'content': '''$QUERY''' ...").
  • Risk: Because $QUERY is interpolated directly into Python triple-quotes without escaping, a malicious input containing triple-quotes (''' ) can break out of the string literal and execute arbitrary Python commands on the user's system.
  • [PROMPT_INJECTION]: The skill exhibits misleading metadata and lacks safeguards against indirect prompt injection.
  • Evidence (Metadata): The SKILL.md documentation provides a guide for multiple models like sonar-reasoning-pro and sonar-research, but the scripts/perplexity_search.sh script contains a hardcoded check that terminates execution if any model other than the base sonar is used.
  • Evidence (Indirect Injection Surface):
  • Ingestion points: The $QUERY and $SYSTEM_PROMPT variables in scripts/perplexity_search.sh accept untrusted input.
  • Boundary markers: No delimiters or instruction-ignore wrappers are used when passing these inputs to the API or the local Python execution block.
  • Capability inventory: The skill possesses network access via curl and local script execution via python3.
  • Sanitization: No sanitization, escaping, or validation is performed on inputs before they are used in command-line arguments and API payloads.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jun 22, 2026, 05:31 AM
Security Audit — agent-trust-hub — perplexity-4