Back to skill

Security audit

avatar-generator

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently generates SVG avatars, but users should understand it runs a pinned npm package through npx and writes an SVG file locally.

Install only if you are comfortable letting your agent run the pinned npm package @bitmappunks/avatar-generator@0.0.5 via npx and create SVG files at the requested path. Prefer explicit seeds and output paths, and avoid running the preview helper on untrusted arbitrary SVG files.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Warning
Location
SKILL.md:27
Finding

Automatic Retrieval and Execution of an Externally Hosted npm Package

Content
View full analysis
" --seed "" ``` - `-y` auto-accepts the npx install prompt. - The `@0.0.5` pin is required — never run it unpinned (`@latest` or bare). ``` ### Technical Analysis The skill instructs the agent to use `npx -y` to retrieve and execute `@bitmappunks/avatar-generator@0.0.5`. When the package is not already cached, its executable code and any permitted npm lifecycle behavior are obtained from the configured npm registry and run automatically. The explicit version pin improves reproducibility and reduces accidental version drift, but it does not cryptographically bind the command to package contents reviewed as part of this repository. The effective code being executed is absent from the audited project. Its integrity therefore depends on external registry infrastructure, package-maintainer credentials, npm configuration, transport security, and the local npm cache. The `-y` option removes the interactive installation confirmation, allowing the external package to execute as part of an ordinary avatar-generation request without a separate approval step. ### Attack Path 1. An attacker compromises the package publisher, registry artifact, configured npm registry, proxy, or local npm cache. 2. The attacker causes the artifact resolved as `@bitmappunks/avatar-generator@0.0.5` to contain malicious executable code. 3. A user asks the agent to generate an avatar. 4. The agent follows the skill instructions and invokes `npx -y`. 5. npm retrieves or reuses the compromised artifact and executes it under the agent process's user account. 6. The payload can access resources available to that account, subject to o ...[truncated 622 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/svg-tui.js:4
Finding

Unbounded SVG Dimensions Can Cause Memory and Terminal Output Exhaustion

Content
View full analysis
Array(w).fill([0, 0, 0])); for (const m of svg.matchAll(/d="M(\d+) (\d+)v1h(\d+)v-1"[^>]*fill="(#[0-9a-fA-F]{6})/g)) { const x = +m[1], y = +m[2], dw = +m[3], hex = m[4]; const r = parseInt(hex.slice(1, 3), 16); const g = parseInt(hex.slice(3, 5), 16); const b = parseInt(hex.slice(5, 7), 16); for (let col = x; col < Math.min(x + dw, w); col++) grid[y][col] = [r, g, b]; } for (const row of grid) { console.log(row.map(([r, g, b]) => `\x1b[48;2;${r};${g};${b}m \x1b[0m`).join('')); } ``` ### Technical Analysis The preview script reads an entire input file synchronously and trusts the numeric `width` and `height` attributes extracted from that file. It then creates a two-dimensional array containing approximately `width × height` entries. Neither the file size nor the parsed dimensions are bounded. A crafted SVG declaring very large dimensions can therefore cause excessive memory allocation. If allocation succeeds, the subsequent rendering loop constructs and prints output proportional to the same number of cells, potentially consuming substantial CPU time and flooding the terminal or agent transcript. Input validation is also incomplete: - Failed width or height matches cause an uncaught exception when `[1]` is accessed. - The parsed stripe row `y` is not checked against `h`, so `grid[y][col]` can access an undefined row and terminate execution. - There is no timeout, cell-count limit, output-size limit, or graceful malformed-input handling. The expected generator output is reportedly 24×24, which reduces exposure during nor ...[truncated 1234 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger description is extremely broad, covering common phrases like 'generate', 'make', or 'produce' an avatar from a seed, name, or ID. In an agentic environment this can cause unintended activation and execution of side-effecting steps, including network package installation and file creation, when the user may have only been discussing avatars conceptually.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill should generate deterministic pixel-art avatar SVGs from a seed using a specific npm package and write them to a file. The provided code does none of that. It takes a path to an SVG file (defaulting to alice.svg), reads it from the filesystem, extracts dimensions and colored path segments with regex, builds a pixel grid, and prints a terminal visualization using ANSI background colors. This is a materially different primary purpose and introduces undeclared file-reading/rendering behavior while omitting the claimed avatar-generation and file-writing functionality.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger text is unusually broad, matching generic phrases like 'generate', 'make', or 'produce an avatar' tied to common identifiers such as a name or ID. In an agent environment, broad routing can cause this skill to activate in contexts the user did not intend, leading to unintended package execution via npx, filesystem writes, and terminal rendering behavior.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
> [English](SKILL.md) · [中文](SKILL-zh.md)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest-level purpose is deterministic avatar generation from a seed string, and the README repeatedly emphasizes reproducibility for the same seed. However, these lines document behavior where omission of a seed causes the agent to generate one from the current time, which makes the skill produce different outputs across invocations and broadens it from deterministic generation to ad hoc random-ish generation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Defaulting to write a file into the current working directory creates a side effect without an explicit, user-confirmed destination. This can place files in sensitive or unexpected locations, overwrite user expectations about workspace cleanliness, and make accidental invocation more harmful when combined with the broad trigger behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to run 'npx -y' against a remote npm package, which downloads and executes package code from the registry at runtime. Even with a pinned version, this introduces supply-chain and remote code execution risk, and the automatic acceptance flag reduces opportunities for user awareness or intervention.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file describes generating avatars and saving them to paths like ./alice.svg or /tmp/u42.svg, and states that output path is required, but it does not include any explicit caution about overwriting files or modifying the filesystem. Because markdown files should warn about behaviors that could affect user data or system integrity, the absence of a user-facing warning about file writes is a minor disclosure gap.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The markdown explains that the skill generates avatars and saves them to an output path, including absolute paths such as /tmp/u42.svg, but it does not explicitly warn users that running the skill will create or overwrite files on disk. Because this README is the skill's user-facing description, a brief disclosure about filesystem writes would satisfy the warning requirement for markdown files.

Content

No source excerpt is available for this finding.