Back to skill

Security audit

infinimo-ai-design-image-create

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its image-generation purpose, but its upload helper can send any local file to the remote service without enforcing the documented image-only limit or asking for confirmation.

Install only if you are comfortable sending prompts, selected images, and your API token to the Clawec/Infinimo service. Before use, verify upload paths carefully, do not let the agent upload arbitrary local files, avoid confidential or regulated images, and prefer a narrowly scoped or disposable API key if available.

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

Error
Location
scripts/upload.sh:4
Finding

Unrestricted Local File Upload to a Remote Service

Content
View full analysis
}" 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}" \ -F "platform=1" \ -F "terminal=4" \ -F "language=en" ``` The declared restriction appears in `SKILL.md`, lines 103–106: ```markdown Limits (same as web): - `image/*` only - Up to **12** reference images per job ``` ### Technical Analysis The upload script verifies only that the supplied path resolves to a regular file using `[[ -f "$FILE" ]]`. It does not verify: - The file's MIME type or image signature - Whether an image decoder can safely parse the file - The file extension or size - Whether the path is a symbolic link - Whether the resolved path is inside an approved working directory - Whether the user explicitly approved that particular file for upload The `-f` test follows symbolic links. Consequently, a symbolic link to another readable regular file also passes validation. After this minimal check, `curl -F "file=@${FILE}"` reads and transmits the selected file to `https://www.clawec.com/api/upload/image`. Although the documentation states that only images are supported, the client does not enforce that restriction. A server-side rejection would occur only after the client has already transmitted the request body, so it does not eliminate the local disclosure attempt. This behavior exceeds the minimum privilege necessary for reference-image upload because the script can read and submit any regular file accessible to the account running the Skill. ### Attack Path 1. An attacker supplies task content t ...[truncated 1387 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create.sh:35
Finding

API Credentials Exposed in Process Command-Line Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The code does align with part of the description: it creates AI image jobs, allows optional model/ratio/size selection, and includes reference images in the request payload. However, important declared capabilities are missing from this chunk. There is no result polling logic, and there is no implementation of file upload handling for references—only a provided JSON array is passed through. So the description overstates the implemented functionality of this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose describes a fairly complete AI image generation client for Infinimo, but the supplied code is just one shell script that makes a simple authenticated request to a different domain (clawec.com) with three static parameters. Nothing in the code supports the core declared capabilities such as text-to-image or image-to-image inputs, reference-based uploads, configurable generation settings, asynchronous job submission, or polling. The accessed resource is also inconsistent with the stated Infinimo API.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description centers on AI image generation workflows through the Infinimo API: configuring generation options, uploading reference images, submitting jobs, and polling outputs. The supplied code chunk only calls a logs endpoint (/image/create/logs) with pagination parameters and authentication token, which indicates fetching historical records or audit/log data. That is a materially different primary purpose from image generation. No code in this chunk performs generation, upload, configuration selection, or polling for generated assets, so the description does not accurately represent the behavior shown.

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 execution (curl, bash scripts/*.sh) but does not declare any tool scope or allowed-tools boundary. That increases the chance an agent/runtime will execute shell commands without explicit least-privilege constraints, which is a real security control gap even if the commands themselves target the advertised API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill encourages uploading reference images and sending prompts to a third-party service but does not prominently warn users that their data leaves the local environment. This can expose sensitive product images, proprietary creative material, personal data embedded in images, or confidential prompts without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The skill explicitly sends user prompts, uploaded image references, and authentication tokens to an external API endpoint. External transmission is expected for this integration, but it remains security-relevant because sensitive user content and credentials may be disclosed to a third party if users are not warned or if the endpoint trust boundary is not clearly communicated.

Content

Scanner excerpt · SKILL.md (reported line 169)May include surrounding context.

Request

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file documents a log-deletion operation and only notes the parameter and success response, without any warning that the action deletes records. For markdown files, destructive behaviors that could affect user data or system state should include a clear warning so users understand the impact before invoking the operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code accesses sensitive credentials from INFINIMO_TOKEN or INFINIMO_API_KEY and uses them in an outbound HTTP request. The script provides no confirmation, logging, comment, or other user disclosure explaining that credentials and prompt data will be sent to a remote service.

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 58)May include surrounding context.

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

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
90% confidence
Finding

This shell script makes a network call and sends a credential-derived header using the Token value, but the file contains no comment, echo/log message, or confirmation indicating that data will be sent to an external service. For code files, network transmission of data and credential use should have some visible disclosure unless clearly documented elsewhere in-scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The request parameter sets language=en unconditionally, which enforces a specific language choice. The policy requires flagging language or locale restrictions unless the skill offers user opt-in or clearly documents a justified regional constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes image generation capabilities such as reference uploads, job submission, and result polling, but this script queries a separate image creation logs endpoint. Accessing historical creation logs is a distinct behavior not mentioned in the skill description and goes beyond the stated generation-and-polling scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code performs an HTTP request and includes a credential-derived token in the request headers, but the script provides no confirmation prompt, print/log message, or explanatory comment disclosing that it will contact a remote service using the user's API credential. For a code file, network transmission of credentials or system data without any visible disclosure matches the missing user warning criterion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script transmits a local file and an API token to a remote external service, but provides no user-facing disclosure, confirmation, or host validation beyond requiring the file path and token to exist. In an agent-skill context, this can cause unintended exfiltration of sensitive local images or credentials because users may invoke the skill without realizing exactly what data is being sent and to which domain.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Documenting a delete endpoint without highlighting that it permanently removes generation history can lead to accidental destructive actions by agents or users. In an automated setting, a seemingly routine cleanup step may erase records needed for auditability, user access, or troubleshooting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction to default to an English summary imposes a language preference in natural-language behavior. The policy allows locale constraints only when users are given a choice or the restriction is clearly justified, neither of which is present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes generating images via the Infinimo API, including job submission and polling, but does not mention credential harvesting or environment access as part of the skill's scope. Reading INFINIMO_TOKEN or INFINIMO_API_KEY is an additional capability beyond the user-facing purpose, even though it is commonly used to authenticate API calls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The payload sets "language": "en" unconditionally, which enforces a specific language/locale regardless of user preference. This is a natural-language policy concern because the script does not provide opt-in, configuration, or documentation justifying the restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script reads INFINIMO_TOKEN or INFINIMO_API_KEY, which are sensitive credential values, but provides no comment or user-facing notice about that access. Under the code-file warning criteria, sensitive environment variable access should not be silent when there is no other disclosure present in the file.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
65% confidence
Finding

The script obtains authentication material from INFINIMO_TOKEN or INFINIMO_API_KEY environment variables, but the manifest focuses on image-generation operations and does not mention credential or environment access. While authentication may be operationally necessary, that capability is not explicitly justified by the stated purpose alone.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The request hard-codes language=en, which enforces a specific language setting without offering user opt-in or indicating that the skill is intentionally region- or language-specific. This is a natural-language policy concern because it constrains locale behavior silently.

Content

No source excerpt is available for this finding.