Back to skill

Security audit

Nano Banana Pro Image Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does the advertised Media.io image-generation work, but it also includes an under-disclosed account credits query that uses the same API key.

Install only if you are comfortable giving this skill a Media.io API key that can submit generation jobs and query the account credits balance. Use a dedicated, least-privilege Media.io key if available, avoid running scripts/skill_router.py directly unless you intend to perform the Credits query, and consider pinning dependencies in a virtual environment.

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:66
Finding
Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:66-68` **Vulnerability Type**: Unpinned and integrity-unverified Python dependency **Risk Level**: Low ### Vulnerable Code ```bash ### 1) Install Dependency ```bash pip install requests ``` ``` ### Technical Analysis The installation instructions direct users to install `requests` without a version constraint, lockfile, hash verification, or explicit trusted package index. Consequently, the installed package and its transitive dependencies may differ from those reviewed during this audit. Although `requests` is a legitimate and widely used package, this installation pattern provides no reproducible dependency resolution or integrity guarantee. If a future package release, transitive dependency, configured package index, or dependency-resolution environment is compromised, following the documented command could install attacker-controlled code. This finding is limited to supply-chain hardening. The audited project does not itself contain evidence that the named package is malicious. ### Attack Path 1. An attacker compromises a future release of the dependency, one of its transitive dependencies, or a package index used by the victim's pip configuration. 2. A user follows the documented `pip install requests` instruction. 3. Pip resolves the dependency to the attacker-controlled or compromised version because no reviewed version or cryptographic hash is required. 4. Malicious installation hooks or imported runtime code execute in the user's Python environment. 5. The malicious code obtains the permissions of the account running pip or the Skill. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user performing the installation or running the Skill. Depending on that user's permissions, the affected scope could include files, credentials, environment variables, and network resources accessible to that account. If installation is performed w ...[truncated 85 chars]
Remediation
## Remediation Suggestions 1. Pin `requests` and all transitive dependencies to reviewed versions in a requirements or lock file. 2. Require cryptographic hashes during installation, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Generate the requirements file through a reproducible dependency-locking workflow and review dependency updates before adoption. 4. Configure installation to use an explicitly trusted package index. 5. Recommend installation inside a dedicated virtual environment and warn users not to run pip with administrative privileges. 6. Add automated dependency and vulnerability scanning to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents use of environment variables, local file access, and outbound network calls, but it does not declare any explicit tool scope or permissions. This creates a transparency and governance gap: a host may expose broader capabilities than users or reviewers expect, increasing the risk of unintended secret access or network egress when the skill is executed.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill is described as an image generator, but the documentation also exposes a separate user-credits query endpoint. That expands the skill beyond its stated purpose and creates an unnecessary account-information access path that could be invoked without the user clearly intending an account lookup.

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
91% confidence
Finding
This file documents transmission of authenticated requests, including an API key header, to an external service. External transmission is expected for this type of skill, but the danger here is that it includes account-level credits access unrelated to core image generation, increasing the scope of sensitive data sent or retrieved from a third party.

Description-Behavior Mismatch

Medium
Confidence
84% confidence
Finding
The manifest describes a skill for generating AI images via Nano Banana Pro, but the implementation is a generic API router that loads all API definitions from c_api_doc_detail.json and can invoke any named endpoint in that file. The example invocation of a 'Credits' API at L79-L80 further shows the code supports account/metadata operations beyond image generation itself.

Description-Behavior Mismatch

Low
Confidence
87% confidence
Finding
The manifest description and overview frame the skill as generating AI images via Nano Banana Pro. However, the usage section shows invocation of a distinct 'Task Result' operation to poll task status, which expands the documented behavior beyond pure generation into job-management/status retrieval.

Vague Triggers

Low
Confidence
86% confidence
Finding
The credits-query documentation uses broad descriptive language without clear activation boundaries, so an agent could plausibly invoke it for loosely related requests. In a skill environment, ambiguous trigger criteria increase the chance of unintended external calls involving authenticated account data.

Vague Triggers

Low
Confidence
89% confidence
Finding
The task-result endpoint is documented generically enough that it may be matched for broad status-checking requests outside the intended generation workflow. This can cause unnecessary authenticated API calls and expose task metadata when the user did not specifically request checking a Media.io generation task.

Vague Triggers

Low
Confidence
91% confidence
Finding
The description focuses on general image-generation capability and nuanced conceptual descriptions, but it does not provide a concrete trigger phrase set, explicit scope limits, or exclusions. In a manifest-like JSON file, this broad language can cause unintended invocation for many common image-editing or generation requests.

Static analysis

No suspicious patterns detected.