Back to skill

Security audit

infinimo-ai-design-product-image-create

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a coherent Infinimo image-generation API helper, but its upload script can send any selected local file to the external service without enforcing that it is an image or requiring confirmation.

Install only if you trust Infinimo/clawec.com with your product images, prompts, and job metadata. When using upload.sh, provide only intended non-sensitive image files and avoid letting untrusted instructions choose local file paths; the skill does not itself verify that the uploaded file is really an image.

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/upload.sh:4
Finding

Arbitrary Local File Upload Due to Missing Image Validation

Content
View full analysis

Vulnerability Details

File Location: scripts/upload.sh, lines 4–14
Vulnerability Type: Unrestricted local file upload to an external service
Risk Level: Medium

bash
FILE="${1:?Usage: upload.sh <image-path>}"
TOKEN="${INFINIMO_TOKEN:-${INFINIMO_API_KEY:?Set INFINIMO_TOKEN or INFINIMO_API_KEY}}"

if [[ ! -f "$FILE" ]]; then
  echo "Error: file not found: $FILE" >&2
  exit 1
fi

curl -s -X POST "https://www.clawec.com/api/upload/image" \
  -H "Token: $TOKEN" \
  -F "file=@${FILE}" \

Technical Analysis

The script accepts an arbitrary path and verifies only that it refers to a regular file. It does not validate the file's content-derived MIME type, extension, size, canonical location, or image decodability. Although the skill documentation describes this operation as accepting only image/*, the client does not enforce that restriction before transmitting the file.

Consequently, any readable regular file can be submitted to the external www.clawec.com service. Shell command injection is not evident because the path is quoted, but quoting does not prevent disclosure of the selected file's contents.

Attack Path

  1. An attacker influences the reference-image path supplied in a task or invocation.
  2. The attacker supplies a path to a sensitive readable file rather than a genuine image.
  3. upload.sh checks the path with [[ -f "$FILE" ]]; the check succeeds for a regular sensitive file.
  4. curl -F "file=@${FILE}" reads the local file and transmits its contents to https://www.clawec.com/api/upload/image.
  5. The remote service receives the file, resulting in unauthorized disclosure if server-side validation does not reject it before retaining or processing its contents.

Impact Assessment

Exploitation does not grant additional local privileges; it is limited to files readable by the account running the skill. Within that boundary, it may disclose credentials, environment f ...[truncated 333 chars]

Remediation
View remediation

Remediation Suggestions

  1. Resolve the supplied path to its canonical form and allow uploads only from explicitly approved, user-selected directories.
  2. Reject symbolic links and revalidate the opened file to reduce link-based and path-substitution risks.
  3. Inspect the file content with a trusted MIME-detection mechanism and allow only required image formats, such as JPEG, PNG, and WebP.
  4. Decode the image with a maintained image library before upload; reject files that cannot be successfully decoded.
  5. Enforce conservative file-size and image-dimension limits.
  6. Require explicit user confirmation that identifies the canonical local path and destination before transmitting the file.
  7. Prefer opening and validating the file once, then uploading the same descriptor or a securely created validated copy to reduce time-of-check/time-of-use risk.
  8. Treat server-side validation as defense in depth rather than relying on it as the sole control.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The code does match the core purpose of creating e-commerce product images through an API, including platform selection, optional model/ratio/size parameters, and reference image uploads. However, the declared description says the skill will 'submit and poll,' implying an asynchronous workflow with follow-up status checks, but this code only performs a single POST request and does not poll for completion. The scene handling is limited to cover/cover_other/detail, which only partially maps to the richer described use cases. So the description overstates the implemented behavior enough to count as a mismatch, though the primary domain and intent are aligned.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises an end-to-end AI product image generation workflow: selecting marketplace/platform, configuring generation parameters, uploading references, submitting generation requests, and polling for outputs. The supplied code only uploads an image file to a remote endpoint with fixed metadata and token authentication. While reference upload could be one supporting step of the described workflow, this chunk by itself does not implement the primary declared purpose and instead exposes only a narrow upload capability. Therefore the description materially overstates what this code actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents shell-based scripts and networked API interactions but does not declare any tool scope or allowed-tools boundary. In an agent environment, missing scope declarations can permit broader-than-expected shell usage, increasing the chance of unintended command execution or abuse if later implementation follows the documented scripts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs users to upload reference images to an external third-party API without a clear privacy warning or consent cue. Users may unknowingly transmit sensitive product photos, proprietary assets, or personal data embedded in images to a remote service, creating confidentiality and compliance risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow sends prompts, reference URLs, platform/region selections, and job metadata to a third-party service and polls stored generation logs, but the documentation does not warn users about this external data sharing or likely retention. This can expose proprietary business plans, branded assets, and operational metadata to another service without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The payload hard-codes the language field to "en", which imposes a specific language/locale regardless of user preference. The script does not offer an opt-in, parameter, or explanation for this locale restriction.

Content

No source excerpt is available for this finding.

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

sh
print(json.dumps(body, ensure_ascii=False))
' "$PROMPT" "$MODEL" "$RATIO" "$SIZE" "$IMAGES" "$TARGET_PLATFORM" "$REGION" "$SCENE")

curl -s -X POST "https://www.clawec.com/api/aigc/ec_media/image/create" \
  -H "Token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d "$PAYLOAD"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs an HTTP POST to an external service and includes user-supplied prompt, image URLs, target platform, and region in the request body. There is no confirmation prompt, logging, comment, or docstring warning the user that this data will be transmitted off-system.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script transmits an API authentication token and request metadata to a third-party domain with no user-facing disclosure, confirmation, or indication of what service will receive the credential. While sending a token to the intended API is functionally necessary, this is still a real security concern in an agent skill because users may unknowingly expose sensitive credentials to an external service they did not explicitly authorize in the script flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script reads an API token from environment variables and immediately uses it in a network request header. There is no confirmation prompt, comment, echo/log message, or other user-facing disclosure in this file explaining that credentials will be used and transmitted to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script uploads an arbitrary local file to a remote service and sends an API token in the request, but it provides no user-facing disclosure, confirmation, or guardrails about exfiltrating local content. In a skill intended for image generation, remote upload is expected, but silently transmitting user-supplied files and credentials still creates a real risk of accidental sensitive file exposure or unintended token use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file mandates language=en for all requests as a universal parameter, which is a language/locale constraint. Under the policy, forcing a specific language without user opt-in or clear justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script accesses INFINIMO_TOKEN or INFINIMO_API_KEY and uses the value as an authentication header for the outbound request. There is no accompanying warning or documentation in the script indicating that environment-based credentials will be consumed and sent to a third-party endpoint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The request hard-codes language=en, which imposes a specific language setting without offering user opt-in or documenting why English is required. This can violate language or locale policy expectations for user choice.

Content

No source excerpt is available for this finding.