Back to skill

Security audit

Nanobanana Plus

Security checks for vulnerabilities and agentic risk

Overview

This image-generation skill is not clearly malicious, but it should be reviewed because it can run an unverified external JavaScript file with all environment variables, including API keys.

Install only if you trust both the publisher and the nanobanana-plus executable supplied by the surrounding installation. Use a dedicated API key, avoid running it from directories where untrusted files could be named nanobanana-plus, and do not put secrets or confidential material in image prompts.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/nanobanana-plus.mjs:62
Finding

Untrusted External Script Resolution Enables Tool Hijacking and Environment Secret Exposure

Content
View full analysis
{ const exePath = resolveNanobanana(); const args = buildCliArgs(command, options); const child = spawn(process.execPath, [exePath, ...args], { stdio: ["inherit", "pipe", "pipe"], env: process.env, }); ``` ### Technical Analysis The wrapper does not contain or declare the image-generation implementation that it executes. Instead, it dynamically selects one of two external JavaScript script paths: 1. A file at `bin/nanobanana-plus.js` outside the skill directory, trusted solely because it exists. 2. A fallback script path named `nanobanana-plus`. The fallback value is not resolved to a verified package or a path controlled by the skill. It is passed as the first script argument to the Node.js executable. Node.js can therefore interpret it relative to the child process's working directory. If an attacker can place a file with that name in the working directory, the wrapper can execute the attacker's JavaScript. The preferred `bin/nanobanana-plus.js` path is also outside the audited skill directory and has no ownership, integrity, signature, or real-path validation. An attacker who can create or replace that file can similarly hijack generation requests. The child process receiv ...[truncated 2770 chars]
Remediation
View remediation
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 (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes capability to read environment-backed secrets such as API keys, but it does not declare any explicit tool scope or permissions boundary in the manifest. That weakens user and platform visibility into what the skill can access and makes secret use less auditable, which is especially relevant here because the skill depends on API-key-based external model calls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documentation tells users to submit prompts to the CLI but does not warn that those prompts, and potentially related metadata, are sent to an external image-generation provider using an API key. Users may unknowingly provide sensitive or proprietary text under the assumption the operation is local because the skill emphasizes 'Direct CLI invocation - no server required.'

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest context for this skill says it directly invokes the nanobanana-plus CLI with no server required, but package.json describes it as an "OpenClaw skill wrapper for nanobanana-plus HTTP API." That is a semantic mismatch about how the skill operates, which could mislead users about whether the skill uses a local CLI or an HTTP service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script spawns another executable and forwards the current environment to it, which is a safety-relevant operation for code files. While there is basic usage output elsewhere, there is no explicit warning or disclosure near execution that the command will launch a child process and use environment-provided credentials.

Content

No source excerpt is available for this finding.