Back to skill

Security audit

Nano banana 2

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to provide the advertised Pixwith image generation workflow, but it needs review because its shell command examples may handle user prompts and API values unsafely and it uploads local images to third-party storage.

Review before installing. Use it only when you intend to send prompts and selected images to Pixwith and its upload storage, avoid using sensitive/private photos unless you accept that transfer, protect the PIXWITH_API_KEY as a paid-service credential, and prefer an implementation that builds JSON with a serializer rather than substituting user text into shell commands.

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
SKILL.md:134
Finding

Unsafe interpolation of user-controlled and API-controlled values into shell commands

Content
View full analysis
", "model_id": "0-41", "options": { "prompt_optimization": true, "resolution": "1K", "aspect_ratio": "1:1" } }' ``` Task-status polling: ```bash curl -s -X POST https://api.pixwith.ai/api/task/get \ -H "Content-Type: application/json" \ -H "Api-Key: $PIXWITH_API_KEY" \ -d '{"task_id": ""}' ``` Image-to-image task creation: ```bash curl -s -X POST https://api.pixwith.ai/api/task/create \ -H "Content-Type: application/json" \ -H "Api-Key: $PIXWITH_API_KEY" \ -d '{ "prompt": "", "image_urls": ["", ""], "model_id": "0-41", "options": { "prompt_optimization": true, "resolution": "1K", "aspect_ratio": "0" } }' ``` ### Technical Analysis The documented command templates place dynamic values such as the user prompt, edit instruction, image URLs, and API-returned task identifier inside single-quoted shell arguments. If an agent implements the instructions by directly replacing the placeholders before executing the command, an attacker-controlled single quote can terminate the shell-quoted JSON string. Subsequent shell metacharacters can then introduce an additional command. JSON escaping is not sufficient to prevent this issue because JSON and the shell have separate parsing contexts. A value must first be serialized safely as JSON and must then be passed to the shell without being reinterpreted as executable syntax. The task identifier is returned by the external API ...[truncated 2237 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
description: >-
  Generate and edit images using Pixwith API's Nano Banana 2 model.
  Supports text-to-image and image-to-image (up to 4 reference images).
  Use when the user asks to generate images, edit photos, create AI art,
  text-to-image, or image-to-image with Nano Banana 2.
version: 1.0.1
publisher: Pixwith AI

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The invocation text is broad enough to match many generic image-related requests, which can cause the skill to activate more often than users expect. In this context, over-broad routing matters because the skill can send prompts and user-provided images to an external API, increasing the chance of unintended third-party data disclosure.

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

Verify by running:

bash
curl -s -X POST https://api.pixwith.ai/api/task/get_credits \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY"

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

Verify by running:

bash
curl -s -X POST https://api.pixwith.ai/api/task/get_credits \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY"

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

Verify by running:

bash
curl -s -X POST https://api.pixwith.ai/api/task/get_credits \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY"

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

Verify by running:

bash
curl -s -X POST https://api.pixwith.ai/api/task/get_credits \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY"

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

Verify by running:

bash
curl -s -X POST https://api.pixwith.ai/api/task/get_credits \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY"

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
75% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

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

md
- **model_id**: `0-41` (fixed)
- **prompt** (required): Describe the image to generate or the edit to apply.
- **image_urls** (optional): 1–4 publicly accessible image URLs for image-to-image mode.
- **options.prompt_optimization** (boolean, default `true`): Auto-translate prompt to English.
- **options.resolution** (required): `1K`, `2K`, or `4K`.
- **options.aspect_ratio** (required): `0` (auto-match input image), `1:1`, `16:9`, `9:16`, `3:4`, `4:3`, `3:2`, `2:3`, `5:4`, `4:5`, `21:9`.

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
75% confidence
Finding

Skill contains patterns that could indirectly extract system prompts through rephrasing, translation, summarization, or side-channel techniques.

Content

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

md
- **model_id**: `0-41` (fixed)
- **prompt** (required): Describe the image to generate or the edit to apply.
- **image_urls** (optional): 1–4 publicly accessible image URLs for image-to-image mode.
- **options.prompt_optimization** (boolean, default `true`): Auto-translate prompt to English.
- **options.resolution** (required): `1K`, `2K`, or `4K`.
- **options.aspect_ratio** (required): `0` (auto-match input image), `1:1`, `16:9`, `9:16`, `3:4`, `4:3`, `3:2`, `2:3`, `5:4`, `4:5`, `21:9`.

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

Step 1: Check credits

bash
curl -s -X POST https://api.pixwith.ai/api/task/get_credits \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs uploading user-provided local images to external storage and then using a CDN URL, but it does not require a clear privacy warning or explicit consent immediately before upload. This is dangerous because users may provide sensitive photos expecting local handling, while the skill transfers them to third-party infrastructure including S3/CDN-backed storage.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

This step obtains a presigned upload target for local images, enabling transfer of user files to third-party storage. In context, the danger is not the network call itself but that it facilitates external exfiltration of local user images without a prominently required consent/privacy checkpoint in the workflow.

Content

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

1a. Get a presigned upload URL:

bash
curl -s -X POST https://api.pixwith.ai/api/task/pre_url \
  -H "Content-Type: application/json" \
  -H "Api-Key: $PIXWITH_API_KEY" \
  -d '{"image_name": "photo.jpg", "content_type": "image/jpeg"}'