Back to skill

Security audit

svg-generator-pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local graphics generator, but some advertised capabilities are materially inaccurate, especially the SVG-to-PNG converter that does not actually render the input SVG.

Review this skill before installing. It does not appear to steal data, persist, or run remote code, but do not rely on its PNG converter for faithful SVG conversion, check generated outputs manually, avoid untrusted color or SVG-dimension inputs, and write outputs only to paths you are comfortable overwriting.

Vulnerability Patterns
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate-svg.cjs:19
Finding

SVG Markup Injection Through Unsanitized Color Arguments

Content
View full analysis
``` The interpolated values originate directly from command-line arguments: ```js } else if (args[i] === '--primary' || args[i] === '-p') { primaryColor = args[i + 1]; i++; } else if (args[i] === '--secondary' || args[i] === '-sec') { secondaryColor = args[i + 1]; i++; } ``` ### Technical Analysis The `--primary` and `--secondary` command-line values are inserted directly into XML attribute contexts without color validation or XML escaping. A value containing a quotation mark can terminate the `stop-color` attribute and inject additional attributes or SVG elements into the generated document. SVG is an active document format in some rendering contexts. Depending on how the generated file is opened, embedded, or served, injected markup could include event handlers, links, or external-resource references. Script execution is dependent on the SVG viewer, embedding method, browser security controls, and response headers. The vulnerability becomes security-relevant when an application or agent invokes this script using color values influenced by an untrusted user and then publishes, embeds, or provides the generated SVG to another user. ### Attack Path 1. An attacker supplies a crafted value through `--primary` or `--secondary`. 2. The argument parser stores the value without validating that it is a legitimate CSS color. 3. The value is interpolated inside the quoted `stop-color` XML attribute. 4. The crafted value terminates the intended attribute an ...[truncated 931 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/svg-to-png.cjs:18
Finding

Unbounded SVG Dimensions Permit Memory-Exhaustion Denial of Service

Content
View full analysis
Remediation
View remediation
MAX_WIDTH || height > MAX_HEIGHT || width * height > MAX_PIXELS ) { throw new Error('SVG dimensions exceed the configured limits'); } } validateDimensions(width, height); const canvas = createCanvas(width, height); ``` 2. Select limits appropriate for the application's actual output requirements and available memory. A total-pixel limit is necessary because individually acceptable dimensions can still produce an excessive area. 3. Reject ambiguous or malformed dimensions instead of silently using unsafe values. Use `Number.parseInt(value, 10)` and verify the complete matched value. 4. Run untrusted conversion jobs in isolated workers or containers with memory, CPU, execution-time, and concurrency limits. 5. Catch allocation failures at the top level, return a controlled error, and ensure malformed jobs cannot repeatedly restart or block a worker. 6. Add regression tests using zero, negative, malformed, very large, and high-total-area dimensions. ]]>
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code does generate SVG background graphics, so it is related to the declared domain. However, the implementation is specifically a PowerPoint/presentation background generator with fixed 1920x1080 templates and limited CLI options. It does not provide broad customizable SVG graphics generation for the wide range of use cases stated in the description. The actual behavior is materially narrower and more presentation-specific than the declared purpose, so this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description claims a general-purpose SVG background/graphics generator with multiple styles and customization options. The supplied code instead implements a narrow command-line PNG export script: it reads an SVG file path, ignores the SVG content for rendering purposes, draws a fixed gradient and a single decorative stroke on a canvas, and saves a PNG file. This is materially different from generating customizable SVG assets. The file read/write behavior is also relevant because the description/permissions do not mention filesystem-based conversion. Therefore, the code does not accurately represent the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script advertises SVG-to-PNG conversion but does not render the supplied SVG at all; it only extracts width and height, then generates a fixed decorative image. This is dangerous because downstream users or automation may trust the output as a faithful rasterization of the input, leading to silent data corruption, misrepresentation of user content, or incorrect artifacts in build pipelines.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script advertises SVG-to-PNG conversion, reads the supplied SVG file, but never parses or renders its contents. Instead it generates a hard-coded gradient image, which is a deceptive implementation that can silently corrupt outputs, mislead downstream automation, and undermine trust in any workflow relying on faithful conversion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says the skill generates customizable SVG backgrounds and graphics with multiple styles such as tech, minimal, geometric, and abstract. In this file, style is accepted and logged, but it is never used to change the SVG content, so the actual behavior is a single hard-coded PowerPoint-style design with only color and aspect-ratio variation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a general-purpose SVG generator for multiple styles such as tech, minimal, geometric, and abstract, usable for websites, social media, and UI decoration. This file is narrowly specialized for fixed-size PPT slide background generation with presentation-oriented templates and CLI defaults, which does not match the broader claimed scope.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The inline comments state that the code performs a 'simple conversion,' but the implementation discards the SVG content and substitutes a new graphic. Misleading comments increase the chance that maintainers, reviewers, or users will rely on the tool incorrectly, masking the fact that input content is not preserved.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file name, comments, and function names all indicate true SVG conversion, but the implementation explicitly performs unrelated custom drawing. In a skill whose purpose is generating graphics assets, this mismatch is more dangerous because users and agents are likely to trust the output as a representation of provided SVG input, causing integrity and workflow failures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This SVG contains natural-language comments exclusively in Chinese, such as the labels for gradients, background, and decorative elements. The stated policy flags language/locale constraints across all file types when content forces a specific language without offering choice or justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code outputs 风格: ${style} as if the selected style affected generation, but no logic references style when building the SVG. This creates an intent/behavior contradiction in the script's user-facing documentation output by implying customization that does not occur.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file contains user-facing comments and console output in Chinese, including the success and size messages at the end. For a general-purpose utility script, this imposes a specific language without user opt-in or documentation that the tool is intended only for Chinese-speaking users.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.