Back to skill

Security audit

Poyo Kling 2 6

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward PoYo Kling 2.6 API helper, with network and API-key use disclosed and scoped to the stated video-generation workflow.

Install only if you intend to use PoYo's Kling 2.6 API. Use a dedicated POYO_API_KEY with limited scope if available, review payload JSON before submitting, avoid confidential prompts or private media URLs unless you trust PoYo and any callback receiver, and run the helper from a trusted machine because the API key may be visible to local process-inspection tools while curl runs.

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_kling_2_6.sh:11
Finding

PoYo API Key Exposed Through Process Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/submit_kling_2_6.sh, lines 11-17
Vulnerability Type: Bearer token exposure through process arguments
Risk Level: Medium

bash
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

Technical Analysis

The shell expands ${POYO_API_KEY} before executing curl, placing the complete bearer token in the process argument vector. While the request is transmitted over HTTPS, this does not protect the secret from local process inspection.

Depending on operating-system process visibility and isolation settings, another local user or process may observe the argument through facilities such as /proc/<pid>/cmdline, process-monitoring utilities, diagnostic tooling, audit logs, or process telemetry. The exposure exists for the lifetime of the curl process and may persist longer if process arguments are recorded.

Attack Path

  1. An authorized user invokes scripts/submit_kling_2_6.sh with POYO_API_KEY set.
  2. The shell expands the environment variable into the --header argument.
  3. An attacker with sufficient local process-observation access monitors newly created processes or repeatedly reads process metadata.
  4. The attacker captures the argument containing Authorization: Bearer <secret>.
  5. The attacker reuses the recovered token to authenticate directly to PoYo APIs until the credential is revoked or expires.

Exploitation requires local process-inspection access or access to telemetry that records command-line arguments. Systems configured to restrict process visibility may reduce, but do not eliminate, the underlying exposure.

Impact Assessment

Successful exploitation discloses the POYO_API_KEY. The attacker obtains the API permissions ...[truncated 321 chars]

Remediation
View remediation

Remediation Suggestions

Avoid placing the bearer token directly in curl command-line arguments.

  • Pass sensitive curl configuration through standard input, ensuring the secret does not appear in the process argument vector.
  • Alternatively, use a temporary curl configuration file created with owner-only permissions, delete it reliably with a shell trap, and ensure it is stored on a trusted filesystem.
  • Disable verbose shell tracing around secret handling and ensure monitoring or audit systems do not record authorization headers.
  • Run the helper in an environment with restricted process visibility and least-privilege local access.
  • Rotate POYO_API_KEY if command-line arguments may already have been captured.
  • Prefer a narrowly scoped, short-lived API credential where the provider supports one.

One possible hardening pattern is to provide curl configuration through standard input while exposing only /dev/stdin in the process arguments:

bash
{
  printf 'header = "Authorization: Bearer %s"\n' "${POYO_API_KEY}"
  printf 'header = "Content-Type: application/json"\n'
} | curl --fail-with-body \
    --request POST \
    --url "https://api.poyo.ai/api/generate/submit" \
    --config /dev/stdin \
    --data @"${payload_file}"

Confirm that the target platform does not log curl configuration supplied through standard input.

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

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/api.md (reported line 19)May include surrounding context.

Content-Type: application/json

text

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

Recommended skill env var:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill describes shell execution and network use in prose, but it does not declare an enforceable tool scope such as explicit permissions or allowed-tools metadata. That creates a policy gap where an agent or runtime may permit broader execution than intended, increasing the chance of unintended command execution or data access if the skill is invoked in a permissive environment.

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 · references/api.md (reported line 50)May include surrounding context.

Text-to-Video Example

bash
curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer $POYO_API_KEY" \
  --header "Content-Type: application/json" \

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

sh
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \

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

md
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

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

md
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

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 · references/api.md (reported line 5)May include surrounding context.

md
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

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 · references/api.md (reported line 51)May include surrounding context.

md
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

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 · references/api.md (reported line 70)May include surrounding context.

md
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

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 · scripts/submit_kling_2_6.sh (reported line 14)May include surrounding context.

sh
payload_file="$1"

curl --fail-with-body --request POST \
  --url "https://api.poyo.ai/api/generate/submit" \
  --header "Authorization: Bearer ${POYO_API_KEY}" \
  --header "Content-Type: application/json" \
  --data @"${payload_file}"

Static analysis

No suspicious patterns detected.