Back to skill

Security audit

Pexo AI Video Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its Pexo video-generation purpose, but it needs review because its shell helpers execute a local config file and can send the API key to any configured base URL.

Install only if you are comfortable sending video prompts and uploaded media to Pexo. Keep ~/.pexo/config private and writable only by you, set PEXO_BASE_URL to https://pexo.ai unless you intentionally use another trusted endpoint, and avoid using this skill for sensitive or proprietary files without confirming Pexo's retention and deletion policies.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_common.sh:3
Finding

Arbitrary Shell Command Execution Through Unsafe Configuration Loading

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_common.sh:7
Finding

Bearer API Key Disclosure Through Unvalidated Base URL

Content
View full analysis
&2; return 1; } [[ -n "${PEXO_API_KEY:-}" ]] || { echo 'Missing PEXO_API_KEY' >&2; return 1; } } _pexo_auth_header() { printf 'Authorization: Bearer %s' "$PEXO_API_KEY"; } _pexo_request_json() { local method="$1"; local path="$2"; local body="${3:-}"; shift 3 || true pexo_require_config local body_file header_file err_file response http_code curl_status=0 body_file=$(mktemp); header_file=$(mktemp); err_file=$(mktemp) if [[ -n "$body" ]]; then http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' -d "$body" "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$? else http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$? fi ``` The same behavior also occurs in the server-sent event request at `scripts/_common.sh`, lines 40–43: ```bash pexo_post_sse_ack() { local path="$1"; local body="${2:-}"; local timeout="${3:-20}" pexo_require_config curl -sS -N --connect-timeout 10 --max-time "$timeout" -X POST -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -H "Accept: text/event-stream" -d "$body" "${PEXO_BASE_URL}${path}" 2>/dev/null | sed '/^: stream opened$/q' >/dev/null } ``` ### Technical Analysis `pexo_require_config` checks only whether `PEXO_BASE_URL` is nonempty. It does not require HTTPS, verify that the destination belongs to Pexo, restrict ports ...[truncated 2089 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/_common.sh (reported line 32)May include surrounding context.

sh
http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    fi
    response=$(cat "$body_file"); export PEXO_LAST_HTTP_CODE="${http_code:-0}"
    if [[ $curl_status -ne 0 && "${http_code:-0}" == "000" ]]; then echo "Network error: $(cat "$err_file")" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi
    if [[ "${http_code:-0}" -ge 400 ]]; then echo "HTTP $http_code: $response" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi
    echo "$response"; rm -f "$body_file" "$header_file" "$err_file"
}

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/_common.sh (reported line 33)May include surrounding context.

sh
http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    fi
    response=$(cat "$body_file"); export PEXO_LAST_HTTP_CODE="${http_code:-0}"
    if [[ $curl_status -ne 0 && "${http_code:-0}" == "000" ]]; then echo "Network error: $(cat "$err_file")" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi
    if [[ "${http_code:-0}" -ge 400 ]]; then echo "HTTP $http_code: $response" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi
    echo "$response"; rm -f "$body_file" "$header_file" "$err_file"
}

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/_common.sh (reported line 34)May include surrounding context.

sh
http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    fi
    response=$(cat "$body_file"); export PEXO_LAST_HTTP_CODE="${http_code:-0}"
    if [[ $curl_status -ne 0 && "${http_code:-0}" == "000" ]]; then echo "Network error: $(cat "$err_file")" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi
    if [[ "${http_code:-0}" -ge 400 ]]; then echo "HTTP $http_code: $response" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi
    echo "$response"; rm -f "$body_file" "$header_file" "$err_file"
}

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The skill explicitly supports revising existing videos by reusing the same project_id, which introduces session persistence across interactions. If project identifiers are reused or surfaced without sufficient scoping and confirmation, later prompts may access or modify prior project state, causing unintended disclosure or actions within an ongoing external session.

Content

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

md
---
name: pexoai-agent
description: Create professional short videos (5–60 seconds) for TikTok, Instagram Reels, YouTube Shorts, and brand ads using AI. Use when the user wants to: make a video, create a TikTok, produce a product ad, generate a promo clip, make UGC content, create social media videos, or any video creation task. Supports product videos, lifestyle content, explainer clips, and more — with automatic scriptwriting, shot composition, transitions, and music. Also handles video revision requests. Pexo outputs 16:9, 9:16 (vertical), or 1:1 aspect ratios.
homepage: https://pexo.ai
repository: https://github.com/pexoai/pexo-skills
requires: env:PEXO_API_KEY,PEXO_BASE_URL runtime:curl,jq,file

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description contains very broad invocation triggers such as 'any video creation task' and multiple generic social-media/video phrases. This can cause the agent to invoke the skill in situations the user did not clearly intend, increasing the chance that prompts, files, or project context are sent to an external video service unnecessarily.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow instructs the agent to upload files and send the user's exact request to Pexo, but it does not include a clear user-facing disclosure that prompts, uploaded media, and project metadata are transmitted to a third-party service. This creates a privacy and data-handling risk because users may unknowingly share sensitive or proprietary content externally.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/SETUP.md (reported line 13)May include surrounding context.

md
4. Generate a new API key
5. Copy it (starts with `sk-...`)

### 2. Create the Config File

Create a file at `~/.pexo/config` with:

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/SETUP.md (reported line 42)May include surrounding context.

md
| Error | Cause | Fix |
|-------|-------|-----|
| `Missing PEXO_API_KEY` | Config not found | Create `~/.pexo/config` |
| `INVALID_TOKEN` | Wrong or expired API key | Regenerate at pexo.ai |
| `404 Project not found` | Wrong project ID | Check project ID from create step |
| `rate limit exceeded` | Too many requests | Wait 60s and retry |

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/_common.sh (reported line 27)May include surrounding context.

sh
local body_file header_file err_file response http_code curl_status=0
    body_file=$(mktemp); header_file=$(mktemp); err_file=$(mktemp)
    if [[ -n "$body" ]]; then
        http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' -d "$body" "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    else
        http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    fi

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/_common.sh (reported line 29)May include surrounding context.

sh
if [[ -n "$body" ]]; then
        http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' -d "$body" "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    else
        http_code=$(curl -sS --connect-timeout 10 --max-time 60 -X "$method" -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -D "$header_file" -o "$body_file" -w '%{http_code}' "$@" "${PEXO_BASE_URL}${path}" 2>"$err_file") || curl_status=$?
    fi
    response=$(cat "$body_file"); export PEXO_LAST_HTTP_CODE="${http_code:-0}"
    if [[ $curl_status -ne 0 && "${http_code:-0}" == "000" ]]; then echo "Network error: $(cat "$err_file")" >&2; rm -f "$body_file" "$header_file" "$err_file"; return 1; fi

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/_common.sh (reported line 43)May include surrounding context.

sh
pexo_post_sse_ack() {
    local path="$1"; local body="${2:-}"; local timeout="${3:-20}"
    pexo_require_config
    curl -sS -N --connect-timeout 10 --max-time "$timeout" -X POST -H "$(_pexo_auth_header)" -H "Content-Type: application/json" -H "Accept: text/event-stream" -d "$body" "${PEXO_BASE_URL}${path}" 2>/dev/null | sed '/^: stream opened$/q' >/dev/null
}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script performs a network PUT upload of the provided file to a remote URL, which transmits user data off-host. Aside from argument validation, there is no confirmation prompt, logging, comment, or docstring in this file warning the user that the specified file will be uploaded to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code file makes an HTTP/API call to create a project via /api/biz/projects, which is a state-changing remote operation. The script contains no confirmation prompt, user-facing notice, or inline warning indicating that running it will create a remote resource.

Content

No source excerpt is available for this finding.