Back to skill

Security audit

Phaya Media API

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to document a real Phaya media API, but it exposes broad paid, account, upload/download, and cache-control capabilities without enough scoping or privacy guidance.

Review before installing. Use a scoped Phaya API key with a small credit balance, confirm expensive generation jobs before running them, and avoid sending private prompts, regulated data, unpublished media, or third-party video URLs unless you accept Phaya's and its providers' handling of that data. Be especially cautious with account, upload/download, and cache-invalidation endpoints.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

External Script Fetching

High
Category
Supply Chain
Content
**curl:**
```bash
curl -s "$PHAYA_BASE/user/credits" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
  | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['credits_balance_formatted'])"
```
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
**curl:**
```bash
JOB=$(curl -s -X POST "$PHAYA_BASE/text-to-image/generate" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A neon-lit Tokyo street at night, cinematic","aspect_ratio":"16:9"}' \
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
echo "Job ID: $JOB"

while true; do
  DATA=$(curl -s "$PHAYA_BASE/text-to-image/status/$JOB" \
    -H "Authorization: Bearer $PHAYA_API_KEY")
  S=$(echo $DATA | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")
  echo "Status: $S"
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
**curl:**
```bash
JOB=$(curl -s -X POST "$PHAYA_BASE/sora2-text-to-video/create" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A dragon flying over misty mountains at dawn","aspect_ratio":"landscape","n_frames":"10"}' \
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
## 16. Phaya-GPT Chat

**curl (non-streaming):**
```bash
curl -s -X POST "$PHAYA_BASE/phaya-gpt/chat/completions" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The documented capability set materially exceeds the skill’s stated purpose of media generation and chat by including generic media manipulation endpoints and arbitrary third-party video downloading. That broader scope increases abuse potential, data-handling risk, and the chance an agent can be induced to perform actions the user did not reasonably expect from the manifest description.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation explicitly states user content is sent to multiple third parties and stored in Supabase, but it does not provide a clear privacy/data-handling warning, retention disclosure, or user-consent guidance. This creates a real risk of users unintentionally sharing prompts, media, voice, and downloaded content with external processors and storage providers.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
A cache invalidation endpoint is an operational control function, not a normal end-user media-generation capability, and its inclusion gives the skill a state-altering administrative action without clear justification. If misused, it can disrupt service behavior, bypass caching protections, or trigger unnecessary backend load and billing-related inconsistencies.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The examples repeatedly instruct users to send API credentials and user prompts/media URLs to a remote SaaS endpoint without any privacy, retention, or third-party sharing warning. In a skill context, this can cause users or downstream agents to exfiltrate sensitive prompts, media, or tokens to an external service without informed consent.

External Transmission

Medium
Category
Data Exfiltration
Content
**curl:**
```bash
JOB=$(curl -s -X POST "$PHAYA_BASE/text-to-image/generate" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A neon-lit Tokyo street at night, cinematic","aspect_ratio":"16:9"}' \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**curl:**
```bash
JOB=$(curl -s -X POST "$PHAYA_BASE/sora2-text-to-video/create" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A dragon flying over misty mountains at dawn","aspect_ratio":"landscape","n_frames":"10"}' \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest describes the skill as using the Phaya backend to generate images, videos, audio, music, and run LLM chat completions. This examples file documents additional endpoints for Thai subtitle generation and yt-dlp-based video downloading, which are materially different from generation/chat and expand the apparent behavior of the skill beyond what the manifest claims.

External Transmission

Medium
Category
Data Exfiltration
Content
## 16. Phaya-GPT Chat

**curl (non-streaming):**
```bash
curl -s -X POST "$PHAYA_BASE/phaya-gpt/chat/completions" \
  -H "Authorization: Bearer $PHAYA_API_KEY" \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Low
Confidence
86% confidence
Finding
The manifest description frames the skill as generating media and running chat completions via the Phaya API. The file additionally documents account-oriented endpoints for fetching the user's profile and credit balance, which are not mentioned in that stated scope. While related to operating the service, they are distinct read-account capabilities beyond the core generation/chat description.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The endpoint is presented as a 'Thai Subtitle Generator' and its behavior is specialized to Thai without stating that this is optional, selectable, or justified as a region-specific tool. Under the language/locale policy, forcing a specific language is a concern unless the locale constraint is clearly documented and justified.

Description-Behavior Mismatch

Low
Confidence
93% confidence
Finding
Account and credit-management endpoints are outside the core user-facing purpose described for the skill and create unnecessary privileged surface area. Even if read-only in part, exposing profile, credit history, and related account operations can leak sensitive billing or account state and enable unintended agent behavior.

Description-Behavior Mismatch

Low
Confidence
87% confidence
Finding
The manifest mentions media generation and LLM chat completions, but does not mention embeddings or vectorization. The examples file includes an `/embedding/create` usage pattern, indicating the skill supports an additional AI capability not represented in the declared description.

Static analysis

No suspicious patterns detected.