Back to skill

Security audit

SVG

Security checks for vulnerabilities and agentic risk

Overview

This SVG guidance skill is coherent and low risk, with two cautions around local preference memory and an unpinned optional SVGO command.

Before installing, be aware that the skill may create `~/svg/memory.md` to remember SVG preferences; review or delete that file if you do not want local preference persistence. If you follow the SVGO example, prefer a pinned project dependency and lockfile-backed command instead of running an unpinned `npx` package.

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
optimization.md:55
Finding
Unpinned Third-Party Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `optimization.md:55-62` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash # Before ls -la icon.svg # 12KB # After SVGO npx svgo icon.svg ls -la icon.svg # 2KB ``` ### Technical Analysis The documented command executes `svgo` through `npx` without specifying a package version or requiring a lockfile-backed local installation. If the package is not already available locally, `npx` can resolve, download, and execute package code from the configured npm registry. Because the resolved package version and registry state can change after this skill has been reviewed, the effective code executed by users is not fixed by the repository. A compromised package release, maintainer account, registry response, or dependency in the package's transitive dependency graph could therefore introduce arbitrary code execution. This is a supply-chain weakness rather than evidence that SVGO itself is malicious. ### Attack Path 1. A user follows the optimization instructions and runs `npx svgo icon.svg`. 2. The requested package is not installed in the local project, so `npx` resolves it using the configured npm registry. 3. An attacker compromises a future package release, a maintainer account, the registry source, or a transitive dependency. 4. `npx` downloads the affected package and executes its command or installation-related code. 5. The malicious code runs with the privileges of the user who invoked the command. ### Impact Assessment Successful exploitation could execute arbitrary code under the invoking user's account. The resulting access could include: - Reading or modifying files accessible to the current user. - Altering project source files and generated SVG assets. - Accessing environment variables, user-level configuration, and locally available development credentials. - Installing additional user-level malware or modifying other writab ...[truncated 216 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add SVGO as an explicitly version-pinned development dependency rather than resolving it dynamically: ```bash npm install --save-dev --save-exact svgo@<reviewed-version> ``` 2. Commit the generated lockfile and use reproducible installation commands such as: ```bash npm ci ``` 3. Invoke the lockfile-backed local executable and prevent network fallback where supported: ```bash npm exec --offline -- svgo icon.svg ``` 4. Review dependency updates before changing the pinned version. Verify package provenance, integrity metadata, maintainership, and transitive dependency changes. 5. Run optimization tools in a restricted environment with no unnecessary credentials, secrets, or write access to unrelated directories. 6. Update the documentation so it does not encourage direct execution of an unpinned registry package. ]]>
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (2)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly states that user preferences persist in `~/svg/memory.md` and should be created on first use, but it provides no notice about privacy, retention, or user consent. Persistent storage of behavioral preferences can expose potentially sensitive workflow information, especially on shared systems or when users do not expect local profile data to be written.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The documentation recommends running `npx svgo` without pinning a specific package version. This can cause users to fetch and execute whatever version is current at invocation time, reducing reproducibility and creating supply-chain risk if a malicious or compromised release is published.

Static analysis

No suspicious patterns detected.