Back to skill

Security audit

Nano Banana Pro

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Replicate image generator, with ordinary third-party API and dependency risks but no hidden persistence or destructive behavior found.

Before installing, be comfortable sending image prompts to Replicate/Google-hosted infrastructure and exposing a Replicate API token to the runtime. Avoid sensitive prompts, use a scoped or rotated token where possible, and prefer pinning the replicate dependency or running in an isolated 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

Warning
Location
SKILL.md:13
Finding
Unpinned Runtime Dependency Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 13 **Vulnerability Type**: Unpinned third-party dependency resolved and executed at runtime **Risk Level**: Medium ### Vulnerable Code ```text uv run --with replicate python {baseDir}/generate.py --prompt "<user prompt>" [--aspect-ratio 1:1] [--output image.png] ``` ### Technical Analysis The documented invocation directs `uv` to resolve, download, install, and execute the `replicate` package without specifying an exact version or enforcing a reviewed lockfile. Consequently, the code executed during each invocation can change independently of the audited skill. Python packages execute code during import, and `generate.py` imports this dependency immediately: ```python import replicate ``` The skill also requires `REPLICATE_API_TOKEN` in its environment. A compromised or unexpectedly malicious upstream package release would therefore execute with the same operating-system privileges and environment access as the skill process, including access to that API credential. This is a supply-chain weakness rather than evidence that the current `replicate` package is malicious. ### Attack Path 1. An attacker compromises the upstream package publisher, release process, package repository account, or another relevant dependency-distribution component. 2. The attacker publishes a malicious version that remains compatible with the unpinned package requirement. 3. A user invokes the documented `uv run --with replicate ...` command. 4. `uv` resolves and installs the attacker-controlled release because no exact version or integrity constraint is enforced. 5. `generate.py` imports `replicate`, causing its Python code to execute. 6. The malicious package reads `REPLICATE_API_TOKEN` or other data accessible to the process and may transmit it externally or perform additional actions under the invoking user's permissions. ### Impact Assessment Successful exploitation permits arbitrary Python code ex ...[truncated 703 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `replicate` to an exact, reviewed version rather than resolving the latest available release at invocation time. 2. Declare dependencies in a project configuration file and commit the generated `uv.lock` file. 3. Invoke the script with locked or frozen dependency resolution so execution fails if the lockfile cannot be honored. 4. Where supported, enforce package hashes or other integrity verification for downloaded distributions. 5. Review both direct and transitive dependencies before updating the lockfile. 6. Perform dependency updates through a controlled process that includes vulnerability scanning and behavioral review. 7. Run the skill in a least-privilege sandbox with access only to the required output directory and network endpoints. 8. Provide only `REPLICATE_API_TOKEN` to the process, avoid exposing unrelated credentials, and scope or rotate the token where the service permits. ]]>
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 (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The skill description says it uses Gemini 3 Pro Image on Replicate and can generate or edit images, but the documented behavior references a different model name and only generation functionality. This mismatch can mislead users and reviewers about what external service is contacted and what capabilities are exercised, undermining trust, policy review, and safe approval decisions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill requires network access to call the Replicate API, but it does not declare any explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can allow broader-than-expected external communication, making review and enforcement harder in an agent environment.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script sends the user-supplied prompt to Replicate's hosted model API without any notice, consent prompt, or disclosure in the code path. Because prompts may contain sensitive or proprietary data, this creates a real privacy and data-handling risk by transmitting potentially confidential content to a third-party service.