Back to skill

Security audit

Nano Banana 2 Image Generator

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a legitimate Media.io image-generation wrapper with disclosed API-key and network use, plus minor scope and dependency notes.

Before installing, understand that prompts, task IDs, reference image URLs, and your Media.io API key are sent to Media.io. Use a dedicated Media.io key with limited account exposure where possible, install dependencies in an isolated environment, and prefer pinning `requests` through a reviewed requirements file. Be aware that running the router script directly queries and prints account credits.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Note
Location
SKILL.md:64
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 64-67 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Low **Vulnerable Code**: ```markdown ### 1) Install Dependency ```bash pip install requests ``` ``` ### Technical Analysis The installation instructions retrieve `requests` without specifying an audited version or verifying package integrity with cryptographic hashes. Dependency resolution can therefore produce different code over time, independently of the reviewed skill package. This does not establish that the current `requests` package is malicious. However, it creates a supply-chain weakness: if the package, its release process, the configured package index, or dependency resolution environment is compromised, following the documented command could install attacker-controlled code. Python packages and their transitive dependencies may execute code during installation or when imported. ### Attack Path 1. An attacker compromises a relevant package release, package index, dependency-resolution path, or transitive dependency. 2. A user follows the Quick Start instructions and runs `pip install requests`. 3. Because no version or integrity hash is specified, `pip` resolves and downloads the mutable package release selected by the configured index. 4. The compromised package executes code during installation, import, or subsequent use by `scripts/skill_router.py`. 5. The malicious code runs with the permissions of the user or service account operating the skill. ### Impact Assessment Successful exploitation could provide code execution within the installation or skill runtime context. The attacker could access files, environment variables, network resources, and credentials available to that user. This could include the `API_KEY` environment variable used by the skill. The maximum scope is limited by the privileges and isolation controls of the account or container running th ...[truncated 178 chars]
Remediation
## Remediation Suggestions 1. Declare dependencies in a version-controlled requirements or lock file using an explicitly reviewed version. 2. Record cryptographic hashes for all direct and transitive dependencies. 3. Install packages with hash verification enabled, for example: ```bash pip install --require-hashes -r requirements.txt ``` 4. Generate and review the lock file through a controlled dependency-management process, and update it only after security review and testing. 5. Use a trusted package index and prevent fallback to unapproved indexes. 6. Run installation and the skill in an isolated virtual environment or container under a least-privileged account. 7. Add automated dependency vulnerability and provenance checks to the release workflow.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (7)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill documentation indicates capabilities that access environment variables, local files, and the network, but it does not declare an explicit tool or permission scope. In an agent ecosystem, this weakens least-privilege controls and can allow the skill to run with broader access than reviewers or users expect, increasing the blast radius if the skill or its dependencies are abused.

External Transmission

Medium
Category
Data Exfiltration
Content
"description": "API to query user credits balance.",
    "api_header": "{\"list\": [{\"name\": \"X-API-KEY\", \"value\": \"API key to authorize requests\"}, {\"name\": \"Content-Type\", \"value\": \"application/json\"}], \"title\": \"Authorizations\", \"describe\": \"Add the following authorization information in the request header\"}",
    "api_body": "{\"title\": \"Request Body\", \"category\": [{\"list\": [], \"title\": \"Query Credits\", \"describe\": \"Request body to query user credits balance\"}]}",
    "api_request_demo": "{\"title\": \"Example Request\", \"request\": [{\"title\": \"Query User Credits\", \"language\": \"cURL\", \"code_example\": \"curl --request POST \\\\n  --url https://openapi.media.io/user/credits \\\\n  --header 'Content-Type: application/json' \\\\n  --header 'X-API-KEY: <api-key>' \\\\n  --data '{}'\"}]}",
    "api_response": "{\"list\": [{\"name\": \"code\", \"type\": \"integer\", \"describe\": \"Response status code, 0 indicates success\"}, {\"name\": \"msg\", \"type\": \"string\", \"describe\": \"Response message, empty string on success\"}, {\"name\": \"data\", \"type\": \"object\", \"describe\": \"Response data object\"}, {\"name\": \"credits\", \"type\": \"integer\", \"describe\": \"User credits balance, located within the data object\"}], \"title\": \"Response\", \"describe\": \"After the request is successfully processed, the server will return the following response\"}",
    "api_code_demo": "{\"list\": [{\"code\": \"0\", \"describe\": \"Success\"}, {\"code\": \"40001\", \"describe\": \"Invalid API key\"}, {\"code\": \"40002\", \"describe\": \"API key expired\"}], \"title\": \"Status Code\"}",
    "content": null,
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The manifest describes a skill for generating AI images via Nano Banana Pro, but the code is a generic dispatcher over arbitrary API definitions loaded from JSON and even demonstrates invoking a 'Credits' API. Querying account credits and routing to any configured endpoint are broader than the narrowly stated image-generation behavior.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
This code sends request data in the JSON body and includes the API key in the outbound headers, but there is no confirmation prompt or user-facing notice when the transmission occurs. Comments and docstrings describe the mechanics for developers, but they do not disclose to the end user that data and credentials are being sent over the network.

Description-Behavior Mismatch

Low
Confidence
84% confidence
Finding
The manifest and overview consistently describe this skill as generating AI images via Nano Banana Pro. However, the documented usage includes invoking a distinct 'Task Result' operation to poll task status, which expands behavior beyond pure image generation into job-management/status retrieval.

Vague Triggers

Low
Confidence
87% confidence
Finding
This JSON manifest-style file describes multiple skills/APIs but does not specify any explicit invocation phrases, scope limitations, or exclusion conditions for when each skill should activate. In manifest files, missing trigger specificity can lead to overly broad or unintended invocation because the activation boundary is not documented.

Context-Inappropriate Capability

Low
Confidence
71% confidence
Finding
The skill's stated purpose is image generation, but the implementation also reaches into process environment state to retrieve credentials. While common in practice, environment access is not described in the manifest and is not part of the user-visible image-generation capability.

Static analysis

No suspicious patterns detected.