Back to skill

Security audit

Poyo Gpt Image 2

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward PoYo image-generation API helper with disclosed network use, though users should handle API keys and image URLs carefully.

Install only if you intend to send image-generation prompts and any referenced image URLs to PoYo. Prefer setting POYO_API_KEY instead of passing the key on the command line, and avoid submitting private, internal, signed, or sensitive image URLs unless you explicitly want PoYo to access them.

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
scripts/submit_gpt_image_2.sh:4
Finding
PoYo API Key Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `scripts/submit_gpt_image_2.sh`, lines 4–7 **Vulnerability Type**: API credential exposure through process arguments **Risk Level**: Medium ```sh api_key="${POYO_API_KEY:-${1:-}}" if [ -z "$api_key" ]; then echo "Usage: submit_gpt_image_2.sh [api_key] [payload.json]" >&2 echo "Or set POYO_API_KEY and pass [payload.json]. If no payload file is given, JSON is read from stdin." >&2 ``` ### Technical Analysis The script accepts the PoYo bearer API key as its first positional command-line argument when `POYO_API_KEY` is not set. Secrets passed through command-line arguments can be exposed through shell history, process inspection facilities, execution telemetry, audit logs, or process-monitoring software. Although the script also supports the safer environment-variable mechanism, its usage message explicitly advertises passing the key as an argument. This can encourage users or automated systems to invoke the script insecurely. ### Attack Path 1. A user invokes the script using the documented positional argument, such as `submit_gpt_image_2.sh API_KEY payload.json`. 2. The bearer key is placed in the shell command line and process argument vector. 3. The command may be retained in shell history, endpoint telemetry, audit records, or process-monitoring output. A sufficiently privileged local observer may also inspect it while the command is running. 4. An attacker with access to one of these local data sources retrieves the key. 5. The attacker submits requests directly to the PoYo API using the stolen bearer credential. This path requires access to local process information, command history, telemetry, or related logs; the project does not itself transmit the key to an undeclared endpoint. ### Impact Assessment Successful exploitation compromises the PoYo API key. The attacker can exercise the API permissions associated with that credential, including subm ...[truncated 244 chars]
Remediation
## Remediation Suggestions - Remove support for supplying the API key as a positional command-line argument. - Require `POYO_API_KEY` or an equivalent secret-management mechanism and update the usage message so it no longer advertises command-line key entry. - Where environment variables are unsuitable, read the key silently from a terminal or dedicated file descriptor without echoing it or placing it in the argument vector. - Use a secrets manager or narrowly scoped credential injection mechanism in automated environments. - Ensure logs and error messages never print the credential. - Rotate any API key that may previously have been entered on a command line, and remove affected shell-history or telemetry records where feasible. - Limit the API key's permissions, quota, and lifetime to reduce the consequences of future disclosure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (14)

Credential Access

High
Category
Privilege Escalation
Content
Content-Type: application/json
```

Get API keys from <https://poyo.ai/dashboard/api-key>.

Recommended skill env var:
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill instructs use of shell via curl and a submission script, but it does not declare an explicit tool scope such as allowed-tools or permissions. That creates an avoidable trust gap where an agent may execute shell/network actions without clear least-privilege boundaries, increasing the chance of unintended command or network use in downstream automation.

External Transmission

Medium
Category
Data Exfiltration
Content
## Text-to-image example

```bash
curl -sS https://api.poyo.ai/api/generate/submit \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
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
## Edit example

```bash
curl -sS https://api.poyo.ai/api/generate/submit \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
Confidence
84% confidence
Finding
This example instructs use of arbitrary `image_urls` that the upstream provider will fetch, which can create SSRF-style risk or unintended disclosure if implementations allow private, internal, or signed URLs to be forwarded without validation. In this skill context, external URL fetching is part of the feature, so the danger is contextual rather than overtly malicious, but it becomes real if user-supplied URLs are not constrained.

External Transmission

Medium
Category
Data Exfiltration
Content
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
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
body=$(cat)
fi

curl -sS https://api.poyo.ai/api/generate/submit \
  -H "Authorization: Bearer $api_key" \
  -H 'Content-Type: application/json' \
  -d "$body"
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script performs a network call to api.poyo.ai and transmits the full JSON body along with an authorization token, but it provides no confirmation prompt, print/log message, or explanatory comment warning the user that input data will be sent off-host. For a code file, this matches the missing user warning criterion for network calls that transmit user or system data.

Static analysis

No suspicious patterns detected.