Back to skill

Security audit

Perplexity Skill

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Perplexity browser-automation toolkit, but it needs Review because it controls a logged-in browser, includes anti-detection behavior, and performs default citation readbacks to untrusted URLs.

Install only if you are comfortable letting this toolkit drive your logged-in Perplexity browser/account. Keep the optional judge disabled unless you intend to send question, answer, and failure context to TypeSafe. Avoid sensitive files or regulated data, use a test or low-risk browser profile where possible, use --dry-run before history deletion, and consider disabling default verification or enforcing outbound network controls if private-network SSRF risk matters in your environment.

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

Warning
Location
src/perplexity_toolkit/verify.py:62
Finding

Automatic Citation Verification Permits Blind SSRF

Content
View full analysis

Vulnerability Details

File Location: src/perplexity_toolkit/verify.py:62-77
Related Call Path: src/perplexity_toolkit/utils/antidetect.py:213-216, src/perplexity_toolkit/search.py:392-396, src/perplexity_toolkit/commands/cli.py:492-496
Vulnerability Type: Server-Side Request Forgery (SSRF) through untrusted citation URLs
Risk Level: Medium

Complete Code Snippets

Citation URLs are extracted from the Perplexity result page with only a string-prefix check:

python
// Sources
const seen = new Set();
r.sources = Array.from(main.querySelectorAll("a[href]"))
    .map(a => ({text: a.textContent.trim().substring(0, 200), href: a.href}))
    .filter(l => l.href.startsWith("http") && !l.href.includes("perplexity.ai") && l.text.length > 2)
    .filter(l => { if (seen.has(l.href)) return false; seen.add(l.href); return true; });

Verification runs automatically unless explicitly disabled:

python
result = _search_with_retry(query, mode, cfg, driver, wait_seconds, expand, new_tab)
if verify and not result.get("error"):
    result = verify_result(result)

The CLI enables verification by default:

python
parser.set_defaults(verify=True)
parser.add_argument("--verify", dest="verify", action="store_true",
                    help="Verify sources and answer quality (default)")
parser.add_argument("--no-verify", dest="verify", action="store_false",
                    help="Skip source and answer-quality verification")

The extracted URL is fetched directly without destination validation:

python
def _readback_source(src: Dict, timeout: float) -> Dict:
    """Fetch bounded page content for a source without retaining the body."""
    url = src.get("href", "")
    base = {"text": src.get("text", "")[:80], "href": url,
            "claim_support": "not_evaluated"}
    if not url or not url.startswith("http"):
        return {**base, "status": 0, "state": "invalid"}

    try:
        req = urllib.request.Request(
            u
...[truncated 3354 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse URLs with urllib.parse.urlsplit() and permit only exact http and https schemes.
  2. Reject URLs containing credentials, malformed hosts, ambiguous numeric IP representations, or unsupported ports.
  3. Resolve the hostname before connecting and reject every address classified as loopback, private, link-local, multicast, reserved, or unspecified.
  4. Disable automatic redirects or validate every redirect target using the same policy before following it.
  5. Re-resolve and validate immediately before connection to reduce DNS-rebinding exposure.
  6. Apply outbound firewall or proxy controls so the process cannot reach localhost, private networks, link-local metadata services, or other sensitive ranges.
  7. Consider making citation readback opt-in rather than enabled by default, especially when citations originate from externally generated content.
  8. Preserve bounded response sizes and timeouts, but do not treat them as SSRF defenses.
  9. Add regression tests covering IPv4, IPv6, encoded IP forms, DNS names resolving to private addresses, and public-to-private redirect chains.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (104)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill introduces an optional remote judge subsystem driven by environment variables and network requests, but that trust boundary is not prominent in the high-level description. Hidden or underexplained remote evaluation paths can expose prompts, outputs, or workflow metadata to third parties and complicate security review.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill states a strict safety rule that model/page text must never determine click targets, but later instructs the agent to click follow-up buttons by matching arbitrary visible text. That creates an ownership-forgery / prompt-injection path where hostile page content can steer automation into activating the wrong control, especially on a dynamic third-party site.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · src/perplexity_toolkit/console_judge.py (reported line 52)May include surrounding context.

python
value = os.environ.get(name)
        if value:
            return value.strip()
    env_path = os.path.expanduser(os.environ.get("HERMES_ENV_FILE", "~/.hermes/.env"))
    try:
        with open(env_path, encoding="utf-8") as fh:
            for line in fh:

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · src/perplexity_toolkit/history.py (reported line 1)May include surrounding context.

python
"""Perplexity history management — list, search, and delete conversations."""

import json
import logging

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · src/perplexity_toolkit/history.py (reported line 229)May include surrounding context.

python
Args:
        config: Configuration.
        driver: Browser driver.
        query: Delete conversations matching this title substring.
        hrefs: Delete specific conversations by URL fragment (UUID).
        limit: Max conversations to check.
        dry_run: If True, only list what would be deleted.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code explicitly uses CDP Input.dispatchKeyEvent to generate trusted key events and the docstring states this makes automation 'invisible to Perplexity's bot detection.' That is not ordinary UI automation; it is deliberate anti-detection behavior intended to bypass platform controls and make automated actions appear human-originated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The text explicitly instructs that the mechanism is 'invisible to Perplexity's bot detection,' which is direct evidence of stealth intent. In this skill's context, that is especially risky because the toolkit is purpose-built to automate Perplexity workflows, so anti-detection language maps directly to bypassing target-platform defenses.

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 · README.md (reported line 192)May include surrounding context.

md
command -v perplexity && perplexity --help >/dev/null && echo "CLI OK"

# 2. WebBridge 守护进程是否启动?
curl -s -X POST http://127.0.0.1:10086/command \
  -H 'Content-Type: application/json' \
  -d '{"action":"list_tabs"}'

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 · README.zh-CN.md (reported line 184)May include surrounding context.

md
command -v perplexity && perplexity --help >/dev/null && echo "CLI OK"

# 2. WebBridge 守护进程是否启动?
curl -s -X POST http://127.0.0.1:10086/command \
  -H 'Content-Type: application/json' \
  -d '{"action":"list_tabs"}'

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises substantial capabilities involving shell execution, network access, environment access, and file read/write, but does not declare any explicit tool scope such as permissions or allowed-tools. That omission weakens least-privilege enforcement and makes it harder for a calling agent or reviewer to understand the real execution boundary before use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Lines L158-L161 recommend a fixed language behavior: technical questions should be asked in English because English sources are better. This is a natural-language locale policy constraint presented as a general strategy, with no user choice or opt-in, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The curl command instructs a local automation service to open an external site, which causes data and session context to be transmitted outside the local environment. While the immediate example only navigates to Perplexity, in practice this pattern is part of a workflow that submits prompts and reads back content, so without guardrails it can facilitate unintended disclosure of sensitive queries or browsing context.

Content

Scanner excerpt · docs/research/perplexity-browser-mapping.md (reported line 31)May include surrounding context.

Step 1: Navigate

bash
curl -s -X POST http://127.0.0.1:10086/command \
  -H 'Content-Type: application/json' \
  -d '{"action":"navigate","args":{"url":"https://www.perplexity.ai","newTab":true,"group_title":"Perplexity search"},"session":"perplexity-search"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document provides concrete automation steps to submit queries to a third-party service and later extract returned page content through a local browser-control API, but it does not mention consent, scope limits, or handling of sensitive data. In a skill context, this can normalize silent collection and transmission of user-entered queries and retrieved content, which becomes risky if the automation is reused on sensitive research sessions or authenticated pages.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document explicitly highlights browser automation under a logged-in session and agentic web actions, but it does not pair that guidance with a prominent warning that automation may access private account data, perform irreversible actions, or trigger account restrictions. In a skill intended to automate a live consumer web product, that omission increases the chance operators will deploy authenticated automation without understanding privacy, consent, or account-impact risks.

Content

No source excerpt is available for this finding.