Back to skill

Security audit

APIKO Media

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rated this skill suspicious because scanners flagged ways an API key could be sent to an unintended destination and an unpinned package command; some references were unresolved, so the evidence is incomplete.

Review the API-key handling and package-install instructions before installing. Consider whether you trust the API destination and are comfortable running an unpinned package; the scan was partial because some local references could not be resolved.

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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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 (7)

Tainted flow: 'req' from os.environ.get (line 58, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

Sending the environment-provided key to the intended API is legitimate, but this request helper relies on urllib's automatic redirect handling after attaching Authorization. An attacker-influenced API redirect can forward that header to another origin or insecure transport because the destination is not revalidated.

Content

Scanner excerpt · scripts/apiko_media.py (reported line 60)May include surrounding context.

python
headers["Content-Type"] = content_type
    req = urllib.request.Request(url, data=data, method=method, headers=headers)
    try:
        with urllib.request.urlopen(req, timeout=timeout) as resp:
            return json.loads(resp.read().decode() or "{}")
    except urllib.error.HTTPError as err:
        raw = err.read().decode(errors="replace")

Tainted flow: 'req' from os.environ.get (line 129, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
98% confidence
Finding

Authentication during downloads is gated only by netloc equality, so an HTTP result URL with the API's netloc receives the bearer key even when API_BASE is HTTPS. In addition, urllib's automatic redirects can forward the explicitly supplied Authorization header to another host, making a manipulated result URL or redirect a credential-disclosure path.

Content

Scanner excerpt · scripts/apiko_media.py (reported line 130)May include surrounding context.

python
if is_api_host(url):
        headers["Authorization"] = "Bearer " + api_key()
    req = urllib.request.Request(url, headers=headers)
    with urllib.request.urlopen(req, timeout=300) as resp:
        ctype = resp.headers.get("Content-Type", "")
        if not out:
            ext = mimetypes.guess_extension(ctype.split(";")[0].strip()) or ".bin"

The API key is not confined to the APIKO host as the module documentation promises.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The claimed APIKO-only credential boundary is not enforced: is_api_host trusts the configurable base's netloc rather than a fixed approved origin, and automatic redirects can carry Authorization beyond the initially checked host. The configurable endpoint may be intentional, but it requires trusted configuration and does not justify forwarding credentials across origins.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 64)May include surrounding context.

md
Progress goes to stderr. On success the script prints one JSON line with `task_id`, `file` and `url`.

If the script is not available, use plain HTTP: `POST https://api.apiko.app/v1/images/generations`, `/v1/images/edits` or `/v1/videos` with `"async": true` for images, then poll `GET https://api.apiko.app/v1/tasks/{id}` every 5–10 seconds until `status` is `completed` or `failed`, and download `data[0].url`. Send the header `Authorization: Bearer $APIKO_API_KEY`.

## Step 3: Report the result

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 64)May include surrounding context.

md
Progress goes to stderr. On success the script prints one JSON line with `task_id`, `file` and `url`.

If the script is not available, use plain HTTP: `POST https://api.apiko.app/v1/images/generations`, `/v1/images/edits` or `/v1/videos` with `"async": true` for images, then poll `GET https://api.apiko.app/v1/tasks/{id}` every 5–10 seconds until `status` is `completed` or `failed`, and download `data[0].url`. Send the header `Authorization: Bearer $APIKO_API_KEY`.

## Step 3: Report the result

MCP server referenced without pinned version: 'npx -y apiko-mcp'.

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The recommended npx command can download and execute an unpinned package release without an installation confirmation. A compromised future release or package account could execute code with the agent's privileges, potentially accessing the API key and local files.

Content

No source excerpt is available for this finding.